chore(backend): Caching envvars
This commit is contained in:
parent
a59417b8f5
commit
207df530b9
5 changed files with 66 additions and 1 deletions
|
@ -5,6 +5,7 @@ const STUDENT_IDP_PREFIX = IDP_PREFIX + 'STUDENT_';
|
|||
const TEACHER_IDP_PREFIX = IDP_PREFIX + 'TEACHER_';
|
||||
const CORS_PREFIX = PREFIX + 'CORS_';
|
||||
const LOGGING_PREFIX = PREFIX + 'LOGGING_';
|
||||
const CACHE_PREFIX = PREFIX + 'CACHE_';
|
||||
|
||||
interface EnvVar {
|
||||
key: string;
|
||||
|
@ -39,6 +40,11 @@ export const envVars: Record<string, EnvVar> = {
|
|||
|
||||
LogLevel: { key: LOGGING_PREFIX + 'LEVEL', defaultValue: 'info' },
|
||||
LokiHost: { key: LOGGING_PREFIX + 'LOKI_HOST', defaultValue: 'http://localhost:3102' },
|
||||
|
||||
CacheHost: { key: CACHE_PREFIX + 'HOST', defaultValue: 'localhost' },
|
||||
CachePort: { key: CACHE_PREFIX + 'PORT', defaultValue: 6379 },
|
||||
CacheTTL: { key: CACHE_PREFIX + 'TTL', defaultValue: 60 * 60 * 24 }, // 24 hours
|
||||
CacheKeyPrefix: { key: CACHE_PREFIX + 'KEY_PREFIX', defaultValue: 'dwengo' },
|
||||
} as const;
|
||||
|
||||
/**
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue