Env
@codification/cutwater-core > Env
Class
Utility for simple detection of the current execution environment.
beta:
Hierarchy
Env
Properties
Methods
Properties
<Static> DEFAULT_PROD_STAGE
● DEFAULT_PROD_STAGE: string = "prod"
Defined in Env.ts:28
Default value for the STAGE variable in Config to indicate a production environment.
readonly:
<Static> ENV_PROD_STAGE
● ENV_PROD_STAGE: string = "PROD_STAGE"
Defined in Env.ts:21
Name of the Config variable expected to contain an override of the default production environment name.
readonly:
<Static> ENV_STAGE
● ENV_STAGE: string = "STAGE"
Defined in Env.ts:14
Name of the Config variable expected to contain the name of the environment.
readonly:
Methods
<Static> isDev
▸ isDev(): boolean
Defined in Env.ts:45
Returns true if the STAGE value in Config does not indicate a production environment. In other words: !Env.isProd().
Returns: boolean
true if a development environment is detected
<Static> isProd
▸ isProd(): boolean
Defined in Env.ts:35
Returns true if the STAGE value in Config indicates a production environment.
Returns: boolean
true if a production environment is detected