1
0
Fork 1
mirror of https://example.com synced 2024-11-26 21:26:39 +09:00
firefish/packages/backend/check_connect.js
Masaya Suzuki ea5725b986
Check redis connection
---------

Co-authored-by: tamaina <tamaina@hotmail.co.jp>
2023-02-23 22:04:47 -08:00

10 lines
269 B
JavaScript

import {loadConfig} from './built/config.js';
import {createRedisConnection} from "./built/redis.js";
const config = loadConfig();
const redis = createRedisConnection(config);
redis.on('connect', () => redis.disconnect());
redis.on('error', (e) => {
throw e;
});