work on proxy
This commit is contained in:
parent
d67d07cba6
commit
2f070d73f9
6 changed files with 73 additions and 86 deletions
|
|
@ -29,7 +29,7 @@ export enum Environment {
|
|||
*/
|
||||
export function loadEnvVariables(envOverride?: string): void {
|
||||
const env = envOverride || process.env.NODE_ENV || 'development';
|
||||
|
||||
console.log(`Current environment: ${env}`);
|
||||
// Order of loading:
|
||||
// 1. .env (base environment variables)
|
||||
// 2. .env.{environment} (environment-specific variables)
|
||||
|
|
@ -51,7 +51,6 @@ export function loadEnvVariables(envOverride?: string): void {
|
|||
*/
|
||||
export function getEnvironment(): Environment {
|
||||
const env = process.env.NODE_ENV?.toLowerCase() || 'development';
|
||||
|
||||
switch (env) {
|
||||
case 'development':
|
||||
return Environment.Development;
|
||||
|
|
@ -64,5 +63,6 @@ export function getEnvironment(): Environment {
|
|||
return Environment.Production;
|
||||
default:
|
||||
return Environment.Development;
|
||||
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue