Allows configuring the host and port of a redis server. Defaults to 127.0.0.1 and 6379

This commit is contained in:
Shane Holland 2019-01-12 16:28:24 -05:00
parent 3410e46ec4
commit 08738b647e

View File

@ -3,8 +3,8 @@ const redis = require('redis');
const config = require('./config');
const client = redis.createClient(
config.REDIS_PORT? config.REDIS_PORT : 6379,
config.REDIS_HOST? config.REDIS_HOST : '127.0.0.1'
config.REDIS_PORT ? config.REDIS_PORT : 6379,
config.REDIS_HOST ? config.REDIS_HOST : '127.0.0.1'
);
exports.get = promisify(client.get).bind(client);