node-slack-events
v1.0.6
Published
This node module helps you listen to events from Slack's Event API.
Downloads
10
Readme
Node Slack Events
This node module helps you listen to events from Slack's Event API
Installation
npm i node-slack-events
Examples
const http = require('http');
const slackWebhook = require('node-slack-events');
const server = http.createServer();
const webhookHandler = slackWebhook({ path: '/webhook' }, server);
// Listen for specific event
webhookHandler.on('message', (event) => {
console.log(event);
});
// Listen for all events
webhookHandler.on('*', (event) => {
console.log(event);
});
server.listen(3005, () => {
console.log('Server is running.');
});