This package connects your node application to your slack or rocket.chat server and send your logs to specific channels or users.
Name | Description |
---|---|
adapter | rocket.chat or slack (default) |
channel | #channel or @username |
alias | alias for username (optional) |
emoji | avatar emoji (optional) |
Name | Description |
---|---|
username | username |
password | password |
url | URL from your rocket.chat server |
Name | Description |
---|---|
token | user token (https://api.slack.com/custom-integrations/legacy-tokens) |
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!');