Skip to content

Node.js on VIP

Node.js environment variables

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 for 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.

Overriding the 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., main)
  • VIP_GO_APP_ID: An application’s unique ID (e.g., 4323)
  • VIP_GO_APP_NAME: An application’s alias (e.g., mytestsite)
  • VIP_GO_APP_ENVIRONMENT: The name of an application’s environment (e.g., production or preprod)  

Last updated: April 21, 2022