Skip to content
This repository was archived by the owner on Mar 24, 2024. It is now read-only.

Latest commit

 

History

History
34 lines (24 loc) · 678 Bytes

File metadata and controls

34 lines (24 loc) · 678 Bytes

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.');
});