1
0
This commit is contained in:
syuilo
2019-02-07 21:02:33 +09:00
parent 27768081e2
commit 5448c22031
19 changed files with 125 additions and 194 deletions
+7 -5
View File
@@ -1,8 +1,10 @@
import * as redis from 'redis';
import config from '../config';
export default config.redis.map(({ host, port, pass }) => {
return redis.createClient(port, host, {
auth_pass: pass.getOrElse(null)
});
}).getOrElse(null);
export default config.redis ? redis.createClient(
config.redis.port,
config.redis.host,
{
auth_pass: config.redis.pass
}
) : null;