1
0
mirror of https://github.com/hotomoe/hotomoe synced 2024-12-12 05:38:12 +09:00
hotomoe/packages/backend/check_connect.js

11 lines
235 B
JavaScript
Raw Normal View History

2023-04-14 14:14:00 +09:00
import Redis from 'ioredis';
import { loadConfig } from './built/config.js';
const config = loadConfig();
const redis = new Redis(config.redis);
redis.on('connect', () => redis.disconnect());
redis.on('error', (e) => {
throw e;
});