mirror of
https://github.com/umami-software/umami.git
synced 2026-02-10 07:37:11 +01:00
Use custom path for generated Prisma client.
This commit is contained in:
parent
5cbf5a567c
commit
5aaff55a70
8 changed files with 38 additions and 46 deletions
|
|
@ -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();
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue