read config also from environment variables, merge on top of json file config

This commit is contained in:
Riku Rouvila
2015-11-24 20:21:31 +02:00
parent 35fc0b9ea8
commit a20b1f6cd2
5 changed files with 20 additions and 25 deletions

View File

@@ -15,7 +15,7 @@ module.exports = {
request
.post('https://koodiklinikka.slack.com/api/users.admin.invite')
.field('email', email)
.field('channels', config.slack.public_channel)
.field('channels', config.slack.publicChannel)
.field('token', config.slack.token)
.field('set_active', 'true')
.end(function(error, response){
@@ -42,7 +42,7 @@ module.exports = {
request
.post('https://koodiklinikka.slack.com/api/chat.postMessage')
.field('text', message)
.field('channel', config.slack.private_channel)
.field('channel', config.slack.privateChannel)
.field('token', config.slack.token)
.end(function(error, response){
if(error) {