name and a value. The backend of that application exposes it to your code as process.env.<NAME>.
Environment variables are a backend concept. They are available to hooks,
scheduled jobs and webhooks, which run on the application server. They are
not shipped to the browser, so a feature’s frontend code cannot read them.
Creating and updating variables
Variables are managed with GraphQL mutations against your application’s/graphql endpoint (authenticated as a user of the application):
_id:
deleteEnvironmentVariable(_id: "...") removes it.
You can list the variables of the application with the environmentVariables query.
Reading a variable from a hook
Inside a hook, read the variable fromprocess.env using its name:
process.env so those hooks stay visible and auditable — the warning is informative, it does not block the hook. See Hooks for the full hook lifecycle.
Naming conventions
- Use
UPPER_SNAKE_CASE— that is how the value is exposed inprocess.env. - Prefix related values so they are easy to spot:
PAYMENTS_API_KEY,PAYMENTS_API_URL. - Avoid the names of the pre-configured variables below unless you intend to change that platform behavior.
Environments and cloning
Environment variables are not copied when you migrate changes between environments or clone an application. Migration moves configuration — features, hooks, menus and permissions — while variables stay tied to the deployment where they were created. This is intentional: development, staging and production should point at different third-party accounts. After promoting changes to a new environment, create the variables that the migrated hooks expect before enabling them, or those hooks will readundefined.
Pre-configured variables
Beyond the ones you create, every Codenull deployment reads a set of variables that change the behavior of the application server itself. These are the ones a designer may need to review or ask to have set:
Other variables present in the deployment are reserved for the platform (database connections, Auth0, plan and storage validations, New Relic). Changing them is not part of application design — contact Codenull if you believe one of them needs a different value.