Check config on load (#4170)
Co-authored-by: syuilo <syuilotan@yahoo.co.jp>
This commit is contained in:
parent
41ba06a5e6
commit
96bc17aa10
19 changed files with 195 additions and 125 deletions
|
|
@ -1,10 +1,8 @@
|
|||
import * as redis from 'redis';
|
||||
import config from '../config';
|
||||
|
||||
export default config.redis ? redis.createClient(
|
||||
config.redis.port,
|
||||
config.redis.host,
|
||||
{
|
||||
auth_pass: config.redis.pass
|
||||
}
|
||||
) : null;
|
||||
export default config.redis.map(({ host, port, pass }) => {
|
||||
return redis.createClient(port, host, {
|
||||
auth_pass: pass.getOrElse(null)
|
||||
});
|
||||
}).getOrElse(null);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue