Options
All
  • Public
  • Public/Protected
  • All
Menu

Class Env

Utility for simple detection of the current execution environment.

Hierarchy

  • Env

Index

Properties

Static DEFAULT_PROD_STAGE

DEFAULT_PROD_STAGE: string = "prod"

Default value for the STAGE variable in Config to indicate a production environment.

readonly

Static ENV_PROD_STAGE

ENV_PROD_STAGE: string = "PROD_STAGE"

Name of the Config variable expected to contain an override of the default production environment name.

readonly

Static ENV_STAGE

ENV_STAGE: string = "STAGE"

Name of the Config variable expected to contain the name of the environment.

readonly

Methods

Static isDev

  • isDev(): boolean
  • Returns true if the STAGE value in Config does not indicate a production environment. In other words: !Env.isProd().

    Returns boolean

Static isProd

  • isProd(): boolean
  • Returns true if the STAGE value in Config indicates a production environment.

    Returns boolean

Generated using TypeDoc