Boltzmann's built-in features are configurable using environment variables.
Boltzmann respects the following environment variables out of the box:
NODE_ENV
: dev(elopment), prod(uction), or test; consumed by are-we-devLOG_LEVEL
: one of error, warn, info, debug; defaults todebug
PORT
: the port to listen on; defaults to 5000; boltzmann always binds0.0.0.0
.DEV_LATENCY_ERROR_MS
: in dev mode, the length of time a middleware is allowed to run before it's treated as hungDEV_LATENCY_WARNING_MS
: in dev mode, the length of time a middleware can run before you get a warning that it's slowGIT_COMMIT
: a bit of text labeled as the git hash for the current running service; used by the optional status endpointHONEYCOMBIO_DATASET
: the name of your Honeycomb dataset, if you have enabled the featureHONEYCOMBIO_WRITE_KEY
: a write key, if you have enabled the Honeycomb featurePGURL
&PGPOOLSIZE
: passed to the postgres pool constructor, if postgres is enabledREDIS_URL
: passed to redis client constructor, if redis is enabledSERVICE_NAME
: the name of the service to advertise to Honeycomb and others; falls back to the name of your package in package.json
The framework does not express any opinions about how this environment is set up. In development you can use dotenv with an invocation like this:
node -r dotenv/config ./boltzmann.js