From d10d56275b542dda39786b06d03d7d4fe1eeaf47 Mon Sep 17 00:00:00 2001 From: Eugen Rochko Date: Thu, 2 Feb 2017 15:29:41 +0100 Subject: [PATCH] Add redis configuration to streaming API --- streaming/index.js | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/streaming/index.js b/streaming/index.js index 99aa5b0402..6652d08437 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)