Update application features and add scripts (core changes)
This commit is contained in:
@@ -0,0 +1,11 @@
|
||||
import Redis from 'ioredis'
|
||||
|
||||
const globalForRedis = globalThis as unknown as {
|
||||
redis: Redis | undefined
|
||||
}
|
||||
|
||||
export const redis =
|
||||
globalForRedis.redis ??
|
||||
new Redis(process.env.REDIS_URL || 'redis://localhost:6379')
|
||||
|
||||
if (process.env.NODE_ENV !== 'production') globalForRedis.redis = redis
|
||||
Reference in New Issue
Block a user