Dependency free Slack notification messaging library for Node.js. Just put the webhook URI into an environment variable and you are good to go! Send Slack notifications like a boss 😎
$ npm install slackr --save
Put your Slack webhook URI into the SLACK_WEBHOOK_URI
environment variable.
const slackr = require('slackr');
slackr.string('This is my message').then(response => {
console.log(response.code, response.body);
});
const data = {
title: 'This is my title',
text: 'This is my message',
attachments: [...],
};
slackr(data).then(response => {
console.log(response.code, response.body);
});