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_RETRY
HOLOCRON_SERVER_MAX_SIM_MODULES_FETCH
HTTPS_PORT
HTTPS_PRIVATE_KEY_PASS_FILE_PATH
HTTPS_PRIVATE_KEY_PATH
HTTPS_PUBLIC_CERT_CHAIN_PATH
HTTPS_TRUSTED_CA_PATH
HTTP_METRICS_PORT
HTTP_ONE_APP_DEV_CDN_PORT
HTTP_ONE_APP_DEV_PROXY_SERVER_PORT
HTTP_PORT
IP_ADDRESS
NODE_ENV
⚠️ ONE_CLIENT_CDN_URL
ONE_CLIENT_CSP_REPORTING_URL
⚠️ ONE_CLIENT_LOCALE_FILENAME
ONE_CLIENT_REPORTING_URL
⚠️ ONE_CLIENT_ROOT_MODULE_NAME
⚠️ ONE_CONFIG_ENV
⚠️ ONE_ENABLE_POST_TO_MODULE_ROUTES
ONE_MAP_POLLING_MAX
ONE_MAP_POLLING_MIN
ONE_REFERRER_POLICY_OVERRIDE
ONE_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=String
Example
HOLOCRON_MODULE_MAP_URL=https://my-cdn.com/module-map.json
Default Value
# if NODE_ENV=development
HOLOCRON_MODULE_MAP_URL=http://localhost:3001/static/module-map.json
# else
HOLOCRON_MODULE_MAP_URL=undefined
Runs In
- ✅ Production
- ✅ Development
Maximum amount of times One App should retry on failed module fetches.
Shape
HOLOCRON_SERVER_MAX_MODULES_RETRY=Number
Default Value
HOLOCRON_SERVER_MAX_MODULES_RETRY=3
Runs 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=Number
Default Value
HOLOCRON_SERVER_MAX_SIM_MODULES_FETCH=30
⚠️ RequiresHTTPS_PRIVATE_KEY_PATH
andHTTPS_PUBLIC_CERT_CHAIN_PATH
to be set.
Runs In
- ✅ Production
- ✅ Development
Sets the port on which One App will listen for requests.
Shape
HTTPS_PORT=Number
Example
HTTPS_PORT=443
Runs 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=String
Example
HTTPS_PRIVATE_KEY_PASS_FILE_PATH=./some-extra-certs.pem
Runs In
- ✅ Production
- ✅ Development
The file path to the private key of an SSL Certificate.
Shape
HTTPS_PRIVATE_KEY_PATH=String
Example
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=String
Example
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=String
Example
HTTPS_TRUSTED_CA_PATH=./some-extra-certs.pem
Runs In
- ✅ Production
- ✅ Development
Sets the port on which One App's metrics server (e.g. Prometheus) will listen for requests.
Shape
HTTP_METRICS_PORT=Number
Default Value
HTTP_METRICS_PORT=3005
Runs 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=Number
Default Value
# if NODE_ENV=development
HTTP_ONE_APP_DEV_CDN_PORT=3001
# else
HTTP_ONE_APP_DEV_CDN_PORT=undefined
Runs 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=Number
Default Value
# if NODE_ENV=development
HTTP_ONE_APP_DEV_PROXY_SERVER_PORT=3002
# else
HTTP_ONE_APP_DEV_PROXY_SERVER_PORT=undefined
Runs In
- ✅ Production
- ✅ Development
Sets the port on which One App will listen for requests.
Shape
HTTP_PORT=Number
Default Value
HTTP_PORT=3000
Runs In
- ✅ Production
- ✅ Development
Specify a specific IP Address for One App to bind to.
Shape
IP_ADDRESS=String
Example
IP_ADDRESS=192.168.1.1
Runs 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=production
Runs In
- ✅ Production
- ✅ Development
Fully qualified base path URL where the Module Bundle folders are located (See Module Map).
Shape
ONE_CLIENT_CDN_URL=String
Example
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=undefined
Runs 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=String
Example
ONE_CLIENT_LOCALE_FILENAME=integration
Default Value
ONE_CLIENT_LOCALE_FILENAME=undefined
Runs 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=String
Example
ONE_CLIENT_REPORTING_URL=https://my-app-errors.com/client
Default Value
# if NODE_ENV=development
ONE_CLIENT_REPORTING_URL=/_/report/errors
# else
ONE_CLIENT_REPORTING_URL=undefined
Runs 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=String
Example
ONE_CLIENT_CSP_REPORTING_URL=https://my-app-csp-violations.example.com/client
Default 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=String
Example
ONE_CLIENT_ROOT_MODULE_NAME=frank-lloyd-root
Runs 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=String
Example
ONE_CONFIG_ENV=staging
Default Value
ONE_CONFIG_ENV=undefined
Runs In
- ✅ Production
- ✅ Development
Set if One App should respond to POST requests.
Shape
ONE_ENABLE_POST_TO_MODULE_ROUTES=Boolean
Default Value
ONE_ENABLE_POST_TO_MODULE_ROUTES=false
Runs In
- ✅ Production
- ✅ Development
Maximum time allowed between module map polls for new modules from One App (in seconds).
Shape
ONE_MAP_POLLING_MAX=Number
Default Value
ONE_MAP_POLLING_MAX=300
Runs In
- ✅ Production
- ✅ Development
Minimum time allowed between Module Map polls for new modules from One App (in seconds).
Shape
ONE_MAP_POLLING_MIN=Number
Default Value
ONE_MAP_POLLING_MIN=0
Runs 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=String
Exampke
ONE_REFERRER_POLICY_OVERRIDE=no-referrer
Default Value
ONE_REFERRER_POLICY_OVERRIDE=same-origin
Runs In
- ✅ Production
- ✅ Development
Feature flag to enable service worker and PWA feature, defaults to false.
Shape
ONE_SERVICE_WORKER=Boolean
Example
ONE_SERVICE_WORKER=true
Default Value
ONE_SERVICE_WORKER=false
📘 More Information
- Useful NodeJS Env Variables: Node CLI Docs
- Development Tools Documentation
- CLI Commands Documentation
- Module Map Documentation