Represents the standard runtime environments used in application development.
This enum is typically used with process.env.NODE_ENV to determine whether the app is running in development, production, or test mode.
process.env.NODE_ENV
if (process.env.NODE_ENV === Environment.DEV) { console.log('Running in development mode');} Copy
if (process.env.NODE_ENV === Environment.DEV) { console.log('Running in development mode');}
Production environment ("production")
"production"
Development environment ("development")
"development"
Testing environment ("test")
"test"
Unknown or undefined environment
Represents the standard runtime environments used in application development.
This enum is typically used with
process.env.NODE_ENV
to determine whether the app is running in development, production, or test mode.Example