diff options
author | Eugen Rochko <eugen@zeonfederated.com> | 2017-02-02 15:29:41 +0100 |
---|---|---|
committer | Eugen Rochko <eugen@zeonfederated.com> | 2017-02-02 15:29:41 +0100 |
commit | d1a01dbbddac1b134e7a2bc93d972de4a7c53f0f (patch) | |
tree | 11900e8d3d18b7f617d29e5c6de4414acfe233ae | |
parent | b6c922f169b6ec76d6e55336ac8a76e4f3e3843a (diff) |
Add redis configuration to streaming API
-rw-r--r-- | streaming/index.js | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/streaming/index.js b/streaming/index.js index 99aa5b040..6652d0843 100644 --- a/streaming/index.js +++ b/streaming/index.js @@ -78,7 +78,11 @@ const streamFrom = (id, req, res, needsFiltering = false) => { res.setHeader('Content-Type', 'text/event-stream') res.setHeader('Transfer-Encoding', 'chunked') - const redisClient = redis.createClient() + const redisClient = redis.createClient({ + host: process.env.REDIS_HOST || '127.0.0.1', + port: process.env.REDIS_PORT || 6379, + password: process.env.REDIS_PASSWORD + }) redisClient.on('message', (channel, message) => { const { event, payload } = JSON.parse(message) |