1
0
mirror of https://github.com/misskey-dev/misskey synced 2024-12-03 01:09:06 +09:00
misskey/packages/backend/scripts/check_connect.js
2024-04-04 22:25:28 +09:00

16 lines
340 B
JavaScript

/*
* SPDX-FileCopyrightText: syuilo and misskey-project
* SPDX-License-Identifier: AGPL-3.0-only
*/
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;
});