yappa kousuru
This commit is contained in:
parent
8a0a54700c
commit
11197ccd0b
5 changed files with 38 additions and 85 deletions
|
|
@ -2,15 +2,7 @@ import Redis from 'ioredis';
|
|||
import { loadConfig } from './built/config.js';
|
||||
|
||||
const config = loadConfig();
|
||||
const redis = new Redis({
|
||||
port: config.redis.port,
|
||||
host: config.redis.host,
|
||||
family: config.redis.family == null ? 0 : config.redis.family,
|
||||
password: config.redis.pass,
|
||||
keyPrefix: `${config.redis.prefix}:`,
|
||||
db: config.redis.db ?? 0,
|
||||
...(config.redis.extra ?? {}),
|
||||
});
|
||||
const redis = new Redis(config.redis);
|
||||
|
||||
redis.on('connect', () => redis.disconnect());
|
||||
redis.on('error', (e) => {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue