Environment variables are used to provide information to an application. This circumvents the need to hardcode configuration values and allows an application to have environment-specific behavior. On the VIP Platform, environment variables are provided when a Node.js application is built and at runtime.
Custom environment variables can be added and managed with VIP-CLI.
Redis environment variables and New Relic environment variables can be used on Node.js environments as well.
NODE_ENV environment variable
The value for
NODE_ENV is always set to “
production” for all Node.js environments on the VIP Platform, even non-production environments. The purpose of the production value is to indicate that an environment is “not a local development environment”, and forces important optimizations.
NODE_ENV value is strongly discouraged and can have negative effects. The behavior of many Node.js libraries is based on the
NODE_ENV variable and may no longer work as expected if this value is changed.
VIP environment variables
VIP environment variables are set per environment and can be used to customize environment-specific behavior.
VIP_GO_APP_BRANCH: The Git branch deploying to an environment (e.g.
VIP_GO_APP_CURRENT_COMMIT_HASH: The Git commit SHA1 hash of the currently deployed code (e.g.
VIP_GO_APP_ID: An application’s unique ID (e.g.
VIP_GO_APP_NAME: An application’s name (e.g.
VIP_GO_APP_ENVIRONMENT: The name of an application’s environment (e.g.
Last updated: February 09, 2024