slack-easy-notifier
v1.0.1
Published
"Easy Slack Notifier"
Downloads
12
Maintainers
Readme
slack-easy-notifier
Easiest way to send messages to slack
How to use
- Install the module:
npm install slack-easy-notifier --save
- Only set your webhook url that you can find on Slack's incomming webhook integration and set your username.
- Enjoy!
//import the module to your project
var slack = require('slack-easy-notifier');
//set your webhook and username which will be displayed on the messages.
slack('https://hooks.slack.com/services/D04EXVCHY/B0AUPG81L/zF58Ido49bneWZJxmfKItRF2', 'Sebas-bot');
//post a message to slack
//slack('Message to post', '#slack-channel', ':icon:');
slack('Server has started', '#backend', ':bangbang:');
You'll see a message similar to this one.
You only need to set webhook and username variables once. After that, you can import the module anywhere into your app to post messages.