outer
v0.2.2
Published
This is a small package to connect your node application to your slack or rocket.chat server and send your logs to specific channels or users.
Downloads
36
Readme
outer
This package connects your node application to your slack or rocket.chat server and send your logs to specific channels or users.
rocket.chat
slack
Options
| Name | Description | |---|---| | adapter | rocket.chat or slack (default) | | channel | #channel or @username | | alias | alias for username (optional) | | emoji | avatar emoji (optional) |
rocket.chat specific
| Name | Description | |---|---| | username | username | | password | password | | url | URL from your rocket.chat server |
slack specific
| Name | Description | |---|---| | token | user token (https://api.slack.com/custom-integrations/legacy-tokens) |
Example
const outer = require('outer');
// CONFIGURE ROCKET.CHAT LOGGER
const rocketChat = new outer({
adapter: 'rocket.chat',
url: 'https://chat.server.com',
channel: '@username',
emoji: ':smirk:',
username: 'username',
password: 'password'
});
// CONFIGURE SLACK LOGGER
const slack = new outer({
// https://api.slack.com/custom-integrations/legacy-tokens
token: 'xoxp-0000000000-00000000-000000000-00000000000',
channel: '#random',
alias: 'My custom username',
emoji: ':smirk:'
});
rocketChat.log('Message from your *app*. Hi Rocket.Chat!');
slack.log('Message from your *app*. Hi Slack!');