Use custom path for generated Prisma client.

This commit is contained in:
Mike Cao 2025-04-28 16:51:24 -07:00
parent 5cbf5a567c
commit 5aaff55a70
8 changed files with 38 additions and 46 deletions

View file

@ -3,13 +3,13 @@ import { REDIS, UmamiRedisClient } from '@umami/redis-client';
const enabled = !!process.env.REDIS_URL;
function getClient() {
const client = new UmamiRedisClient(process.env.REDIS_URL);
const redis = new UmamiRedisClient(process.env.REDIS_URL);
if (process.env.NODE_ENV !== 'production') {
global[REDIS] = client;
global[REDIS] = redis;
}
return client;
return redis;
}
const client = global[REDIS] || getClient();