Skip to main content

Automatically injected environment variables

Nullplatform automatically injects a set of environment variables into your application at runtime. These variables reflect the scope your application is deployed to, including the account, namespace, deployment, and any dimensions used for that release.

Here are the environment variables that are injected:

  • NP_ACCOUNT:

    • Description: Identifies the application account slug.
    • Example: main-account
  • NP_APPLICATION:

    • Description: Specifies the application slug.
    • Example: users-api
  • NP_DEPLOYMENT_ID:

    • Description: The unique ID for the current deployment.
    • Example: 748631913
  • NP_NAMESPACE:

    • Description: The namespace associated with the application.
    • Example: platform
  • NP_RELEASE_SEMVER:

    • Description: The semantic version number of the current release.
    • Example: 1.1.34
  • NP_SCOPE:

    • Description: The scope slug where the application is deployed.
    • Example: production
  • NP_DOMAIN:

    • Description: The domain name associated with the scope.
    • Example: example.com
  • NP_DIMENSION_*:

    • Description: Dimension values on the scope, where * is replaced by the dimension name.
    • Example: NP_DIMENSION_REGION=us-west-2