Move Redis client to utils/redis

This commit is contained in:
MICHAEL JACKSON
2018-02-17 20:21:19 -08:00
parent 2e1f09e913
commit 347c993407
7 changed files with 8 additions and 7 deletions

12
server/utils/redis.js Normal file
View File

@ -0,0 +1,12 @@
const redis = require("redis");
redis.debug_mode = process.env.DEBUG_REDIS != null;
const RedisURL =
process.env.OPENREDIS_URL ||
process.env.REDIS_URL ||
"redis://localhost:6379";
const client = redis.createClient(RedisURL);
module.exports = client;