Type
This commit is contained in:
parent
779c6749ff
commit
d1e382831c
1 changed files with 1 additions and 1 deletions
|
|
@ -23,7 +23,7 @@ async function fetchConfig() {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
export async function getServerEnv(envVar: string): Promise<string> {
|
export async function getServerEnv(envVar: string): Promise<string | undefined> {
|
||||||
// Check if the cache is still valid
|
// Check if the cache is still valid
|
||||||
if (cachedConfig && cacheTimestamp && Date.now() - cacheTimestamp < CACHE_DURATION_MS) {
|
if (cachedConfig && cacheTimestamp && Date.now() - cacheTimestamp < CACHE_DURATION_MS) {
|
||||||
return cachedConfig[envVar] || process.env[envVar];
|
return cachedConfig[envVar] || process.env[envVar];
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue