One App can be configured via Environment Variables:
By Topic
- Network & Protocol Settings
- Running in Production
- Running in Development
- Server Settings
Alphabetical Contents
HOLOCRON_MODULE_MAP_URL⚠️ HOLOCRON_SERVER_MAX_MODULES_RETRYHOLOCRON_SERVER_MAX_SIM_MODULES_FETCHHTTPS_PORTHTTPS_PRIVATE_KEY_PASS_FILE_PATHHTTPS_PRIVATE_KEY_PATHHTTPS_PUBLIC_CERT_CHAIN_PATHHTTPS_TRUSTED_CA_PATHHTTP_METRICS_PORTHTTP_ONE_APP_DEV_CDN_PORTHTTP_ONE_APP_DEV_PROXY_SERVER_PORTHTTP_PORTIP_ADDRESSNODE_ENV⚠️ ONE_CLIENT_CDN_URLONE_CLIENT_CSP_REPORTING_URL⚠️ ONE_CLIENT_LOCALE_FILENAMEONE_CLIENT_REPORTING_URL⚠️ ONE_CLIENT_ROOT_MODULE_NAME⚠️ ONE_CONFIG_ENV⚠️ ONE_ENABLE_POST_TO_MODULE_ROUTESONE_MAP_POLLING_MAXONE_MAP_POLLING_MINONE_REFERRER_POLICY_OVERRIDEONE_SERVICE_WORKER
⚠️ = Required
Runs In
- ✅ Production
- ✅ Development
URL where the Module Map is hosted.
Defaults to http://localhost:3001/static/module-map.json if NODE_ENV is set to development so that One App Dev CDN can be leveraged for local development.
Shape
HOLOCRON_MODULE_MAP_URL=StringExample
HOLOCRON_MODULE_MAP_URL=https://my-cdn.com/module-map.jsonDefault Value
# if NODE_ENV=development
HOLOCRON_MODULE_MAP_URL=http://localhost:3001/static/module-map.json
# else
HOLOCRON_MODULE_MAP_URL=undefinedRuns In
- ✅ Production
- ✅ Development
Maximum amount of times One App should retry on failed module fetches.
Shape
HOLOCRON_SERVER_MAX_MODULES_RETRY=NumberDefault Value
HOLOCRON_SERVER_MAX_MODULES_RETRY=3Runs In
- ✅ Production
- ✅ Development
Maximum number of Holocron Modules One App will try to load at a time when new Modules are found in Module Map.
Useful to configure in case of a large module map and/or a bad network connection.
Shape
HOLOCRON_SERVER_MAX_SIM_MODULES_FETCH=NumberDefault Value
HOLOCRON_SERVER_MAX_SIM_MODULES_FETCH=30
⚠️ RequiresHTTPS_PRIVATE_KEY_PATHandHTTPS_PUBLIC_CERT_CHAIN_PATHto be set.
Runs In
- ✅ Production
- ✅ Development
Sets the port on which One App will listen for requests.
Shape
HTTPS_PORT=NumberExample
HTTPS_PORT=443Runs In
- ✅ Production
- ✅ Development
The file path to a file containing a shared passphrase for single private key (See Node documentation on passphrase for tls.createSecureContext).
Shape
HTTPS_PRIVATE_KEY_PASS_FILE_PATH=StringExample
HTTPS_PRIVATE_KEY_PASS_FILE_PATH=./some-extra-certs.pemRuns In
- ✅ Production
- ✅ Development
The file path to the private key of an SSL Certificate.
Shape
HTTPS_PRIVATE_KEY_PATH=StringExample
HTTPS_PRIVATE_KEY_PATH=./some-private-key.pem
⚠️ Required byHTTPS_PORT
Runs In
- ✅ Production
- ✅ Development
The file path to the public key of an SSL Certificate.
Shape
HTTPS_PUBLIC_CERT_CHAIN_PATH=StringExample
HTTPS_PUBLIC_CERT_CHAIN_PATH=./some-cert.pem
⚠️ Required byHTTPS_PORT
Runs In
- ✅ Production
- ✅ Development
The file path to a file containing one or more certs to trust over the system default. See Node documentation on ca option in tls.createSecureContext.
Shape
HTTPS_TRUSTED_CA_PATH=StringExample
HTTPS_TRUSTED_CA_PATH=./some-extra-certs.pemRuns In
- ✅ Production
- ✅ Development
Sets the port on which One App's metrics server (e.g. Prometheus) will listen for requests.
Shape
HTTP_METRICS_PORT=NumberDefault Value
HTTP_METRICS_PORT=3005Runs In
- 🚫 Production
- ✅ Development
Sets the port on which the One App Dev CDN server will listen for requests. It defaults to 3001 if NODE_ENV
is development, otherwise it is undefined as it is only used for local development.
Shape
HTTP_ONE_APP_DEV_CDN_PORT=NumberDefault Value
# if NODE_ENV=development
HTTP_ONE_APP_DEV_CDN_PORT=3001
# else
HTTP_ONE_APP_DEV_CDN_PORT=undefinedRuns In
- 🚫 Production
- ✅ Development
Sets the port on which the One App Dev Proxy server will listen for requests. It defaults to 3002 if NODE_ENV
is development, otherwise it is undefined as it is only used for local development.
Shape
HTTP_ONE_APP_DEV_PROXY_SERVER_PORT=NumberDefault Value
# if NODE_ENV=development
HTTP_ONE_APP_DEV_PROXY_SERVER_PORT=3002
# else
HTTP_ONE_APP_DEV_PROXY_SERVER_PORT=undefinedRuns In
- ✅ Production
- ✅ Development
Sets the port on which One App will listen for requests.
Shape
HTTP_PORT=NumberDefault Value
HTTP_PORT=3000Runs In
- ✅ Production
- ✅ Development
Specify a specific IP Address for One App to bind to.
Shape
IP_ADDRESS=StringExample
IP_ADDRESS=192.168.1.1Runs In
- ✅ Production
- ✅ Development
May be set to either production or development. When set to development additional tooling
such as one-app-dev-cdn and one-app-dev-proxy is provided to help with local development. It is undefined
by default.
Setting this to development will set a lot of the other environment variables for you to provide
sane development time defaults.
Example
NODE_ENV=productionRuns In
- ✅ Production
- ✅ Development
Fully qualified base path URL where the Module Bundle folders are located (See Module Map).
Shape
ONE_CLIENT_CDN_URL=StringExample
ONE_CLIENT_CDN_URL=https://app-cdn.com/statics/Default Value
# if NODE_ENV=development
ONE_CLIENT_CDN_URL=/_/static/
# else
ONE_CLIENT_CDN_URL=undefinedRuns In
- ✅ Production
- ✅ Development
Locale file name for module language packs. Modifying this per environment allows for modules to have different language packs in different environments.
Must be one of integration, qa, or be undefined (for production). It is undefined by default.
Shape
ONE_CLIENT_LOCALE_FILENAME=StringExample
ONE_CLIENT_LOCALE_FILENAME=integrationDefault Value
ONE_CLIENT_LOCALE_FILENAME=undefinedRuns In
- ✅ Production
- ✅ Development
URL where browser should send client side errors to. Defaults to /_/report/errors if NODE_ENV is set to
development and is undefined otherwise.
Shape
ONE_CLIENT_REPORTING_URL=StringExample
ONE_CLIENT_REPORTING_URL=https://my-app-errors.com/clientDefault Value
# if NODE_ENV=development
ONE_CLIENT_REPORTING_URL=/_/report/errors
# else
ONE_CLIENT_REPORTING_URL=undefinedRuns In
- ✅ Production
- ✅ Development
URL where browser should send CSP errors to. Defaults to /_/report/security/csp-violation if NODE_ENV is set to
development and is undefined otherwise.
Shape
ONE_CLIENT_CSP_REPORTING_URL=StringExample
ONE_CLIENT_CSP_REPORTING_URL=https://my-app-csp-violations.example.com/clientDefault Value
# if NODE_ENV=development
ONE_CLIENT_CSP_REPORTING_URL=/_/report/security/csp-violation
# else
ONE_CLIENT_CSP_REPORTING_URL=undefined
## `ONE_CLIENT_ROOT_MODULE_NAME`
⚠️ Required In Production & Development
**Runs In**
* ✅ Production
* ✅ Development
Name of the module that serves as the entry point to your application. In local development this is
not necessary as you can pass the [`--root-module-name` argument to `npm start`](./Cli-Commands.md#start-commands) instead.
**Shape**
```bash
ONE_CLIENT_ROOT_MODULE_NAME=StringExample
ONE_CLIENT_ROOT_MODULE_NAME=frank-lloyd-rootRuns In
- ✅ Production
- ✅ Development
An arbitrary String key that is used to look up values provided in App Configuration's provideStateConfig for its children modules.
Shape
ONE_CONFIG_ENV=StringExample
ONE_CONFIG_ENV=stagingDefault Value
ONE_CONFIG_ENV=undefinedRuns In
- ✅ Production
- ✅ Development
Set if One App should respond to POST requests.
Shape
ONE_ENABLE_POST_TO_MODULE_ROUTES=BooleanDefault Value
ONE_ENABLE_POST_TO_MODULE_ROUTES=falseRuns In
- ✅ Production
- ✅ Development
Maximum time allowed between module map polls for new modules from One App (in seconds).
Shape
ONE_MAP_POLLING_MAX=NumberDefault Value
ONE_MAP_POLLING_MAX=300Runs In
- ✅ Production
- ✅ Development
Minimum time allowed between Module Map polls for new modules from One App (in seconds).
Shape
ONE_MAP_POLLING_MIN=NumberDefault Value
ONE_MAP_POLLING_MIN=0Runs In
- ✅ Production
- ✅ Development
Overrides the Referrer-Policy header.
Must be one of: no-referrer, no-referrer-when-downgrade, same-origin or strict-origin.
Shape
ONE_REFERRER_POLICY_OVERRIDE=StringExampke
ONE_REFERRER_POLICY_OVERRIDE=no-referrerDefault Value
ONE_REFERRER_POLICY_OVERRIDE=same-originRuns In
- ✅ Production
- ✅ Development
Feature flag to enable service worker and PWA feature, defaults to false.
Shape
ONE_SERVICE_WORKER=BooleanExample
ONE_SERVICE_WORKER=trueDefault Value
ONE_SERVICE_WORKER=false📘 More Information
- Useful NodeJS Env Variables: Node CLI Docs
- Development Tools Documentation
- CLI Commands Documentation
- Module Map Documentation