mirror of
https://github.com/movie-web/backend.git
synced 2025-09-13 16:33:26 +00:00
8 lines
215 B
TypeScript
8 lines
215 B
TypeScript
import { conf } from '@/config';
|
|
import Redis from 'ioredis';
|
|
|
|
export function connectRedis() {
|
|
if (!conf.ratelimits.redisUrl) throw new Error('missing redis URL');
|
|
return new Redis(conf.ratelimits.redisUrl);
|
|
}
|