Skip to content

Enums: Environment

alessbarb edited this page Sep 20, 2023 · 1 revision

File: environment.enum.ts

Overview

The Environment enum is a part of the error-enhanced library and provides a standardized set of values to specify the environment where the application is running. This enumeration enhances system state tracking, logging, and debugging by attaching a particular environment context to each error or log entry.

Features

  • Environment Context: Enables the application to be aware of its current environment, which can be critical for debugging, logging, and feature flagging.

Usage Example

const currentEnvironment = Environment.PRODUCTION;

Enum Members

Key Description
DEVELOPMENT Indicates the development environment, typically local and for debugging.
TESTING Indicates the environment used for automated tests.
STAGING Indicates the staging environment, a pre-production setup.
PRODUCTION Indicates the production environment, where the live application runs.
UNKNOWN Used in case the environment is not known or not specified.

Clone this wiki locally