summaryrefslogtreecommitdiff
path: root/packages/backend/scripts/check_connect.js
blob: ba25fd416c782cd376cb0e3ba37df6b3656e422f (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
/*
 * 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;
});