Skip to content

Commit 6e16aab

Browse files
authored
docs: document environment variables (#403)
1 parent 0881939 commit 6e16aab

File tree

1 file changed

+117
-0
lines changed

1 file changed

+117
-0
lines changed

README.md

+117
Original file line numberDiff line numberDiff line change
@@ -344,6 +344,103 @@ Basically [dotenv][] won't set an environment variable if it already detects it
344344

345345
Take a look at the [config](template/config) folder contents and also at the defaults at [.env.defaults](template/.env.defaults).
346346

347+
* `NODE_ENV` - (options: `development`, `production` default: `development`) - the node environment the app is running in
348+
* `PROXY_PORT` - (default: `8080`) - proxy port used to proxy requests (see [ladjs/proxy][])
349+
* `HTTP_PROTOCOL` - (defaults: `http` recommend: `https`) - protocol used for http requests
350+
* `HTTP_PORT` - (defaults: `80` recommend: `443`) - http port used for http requests
351+
* `WEB_PROTOCOL` - (default: `http`) - [ladjs/web][] application protocol
352+
* `WEB_HOST` - (default: `localhost`) - [ladjs/web][] application host
353+
* `WEB_PORT` - (default: `3000`) - [ladjs/web][] application port
354+
* `WEB_URL` - (default: `{{WEB_PROTOCOL}}://{{WEB_HOST}}:{{WEB_PORT}}`) - web application absolute URI
355+
* `WEB_SSL_KEY_PATH` - [ladjs/web][] file path to your SSL key file
356+
* `WEB_SSL_CERT_PATH` - [ladjs/web][] file path to your SSL certificate file
357+
* `WEB_SSL_CA_PATH` - [ladjs/web][] file path to your SSL certificate authority file
358+
* `API_HOST` - (default: `localhost`) - [ladjs/api][] host
359+
* `API_PORT` - (default: `4000`) - [ladjs/api][] port
360+
* `API_PROTOCOL` - (default: `http` recommend: `https`) - [ladjs/api][] protocol
361+
* `API_URL` - (default: `{{API_PROTOCOL}}://{{API_HOST}}:{{API_PORT}}`) - [ladjs/api][] absolute URI
362+
* `API_SSL_KEY_PATH` - [ladjs/api][] file path to your SSL key file
363+
* `API_SSL_CERT_PATH` - [ladjs/api][] file path to your SSL certificate file
364+
* `API_SSL_CA_PATH` - [ladjs/api][] file path to your SSL certificate authority file
365+
* `API_RATELIMIT_WHITELIST` - [ladjs/api][] ratelimiter whitelisted ips (see: [koa-simple-ratelimit](https://github.com/scttcper/koa-simple-ratelimit))
366+
* `APP_NAME` - (default: `Lad`) - application name (see [usage](https://github.com/search?p=3&q=org%3Aladjs+appName&type=Code))
367+
* `APP_COLOR` - application color theme (see [usage](https://github.com/search?q=org%3Aladjs+appColor&type=Code))
368+
* `TWITTER` - (default: `@niftylettuce`) twitter handle
369+
* `SEND_EMAIL` - (default: `false`) - whether to send email or preview (see [outbound email configuration](https://github.com/ladjs/lad#outbound-email-configuration))
370+
* `TRANSPORT_DEBUG` - (default: `false`) - email transport debug logging (see [debugging](https://github.com/ladjs/lad#debugging))
371+
* `EMAIL_DEFAULT_FROM` - (default: `[email protected]`) - default email `from` address
372+
* `SHOW_STACK` - (default: `true`) - whether or not to output a stack trace when logging (see [cabinjs options][])
373+
* `SHOW_META` - (default: `true`) - whether or not to output metadata to logger methods (see [cabinjs options][])
374+
* `SUPPORT_REQUEST_MAX_LENGTH` - (default: `500`) - support request max message size in characters
375+
* `ERROR_HANDLER_BASE_URL` - (default: `{{WEB_URL}}`) error handling base url (see [koa-better-error-handler](https://github.com/ladjs/koa-better-error-handler))
376+
* `I18N_SYNC_FILES` - (default: `true`) - sync locale information across all files (see [ladjs/i18n options][])
377+
* `I18N_AUTO_RELOAD` - (default: `false`) - watch for changes in json files to reload locale on updates (see [ladjs/i18n options][])
378+
* `I18N_UPDATE_FILES` - (default: `true`) - write new locale information to disk (see [ladjs/i18n options][])
379+
* `AUTH_LOCAL_ENABLED` - (default: `true`) - enable passport local strategy (see [ladjs/passport][])
380+
* `AUTH_FACEBOOK_ENABLED` - (default: `false`) - enable authenticating with Facebook using the OAuth 2.0 (see [ladjs/passport][])
381+
* `AUTH_TWITTER_ENABLED` - (default: `false`) - enable authenticating with Twitter using the OAuth 1.0 (see [ladjs/passport][])
382+
* `AUTH_GOOGLE_ENABLED` - (default: `false`) - enable authenticating with Google using OAuth 2.0 (see [google auth][])
383+
* `AUTH_GITHUB_ENABLED` - (default: `false`) - enable authenticating with Github using OAuth 2.0 (see [ladjs/passport][])
384+
* `AUTH_LINKEDIN_ENABLED` - (default: `false`) - enable authenticating with LinkedIn using OAuth 1.0 (see [ladjs/passport][])
385+
* `AUTH_INSTAGRAM_ENABLED` - (default: `false`) - enable authenticating with Instagram using OAuth 2.0 (see [ladjs/passport][])
386+
* `AUTH_OTP_ENABLED` - (default: `false`) - enable authenticating with OTP, a form of two-factor authentication (see [ladjs/passport][])
387+
* `AUTH_STRIPE_ENABLED` - (default: false) - enable authenticating with Stripe using OAuth 2.0 (see [ladjs/passport][])
388+
* `GOOGLE_CLIENT_ID` - google oauth2 client id (see [google auth][])
389+
* `GOOGLE_CLIENT_SECRET` - google oauth2 secret (see [google auth][])
390+
* `GOOGLE_CALLBACK_URL` - google oauth2 callback url (see [google auth][])
391+
* `GOOGLE_APPLICATION_CREDENTIALS` - path to google cloud platform credentials (see [gcp credentials](https://cloud.google.com/docs/authentication/getting-started))
392+
* `GITHUB_CLIENT_ID` - github oauth client id (see [ladjs/passport][])
393+
* `GITHUB_CLIENT_SECRET` - github oauth secret (see [ladjs/passport][])
394+
* `GITHUB_CALLBACK_URL` - github oauth callback URL (see [ladjs/passport][])
395+
* `POSTMARK_API_TOKEN` - postmark api token (see [outbound email configuration](https://github.com/ladjs/lad#outbound-email-configuration))
396+
* `CODECOV_TOKEN` - codecov api token (see [continuous integration and code coverage](https://github.com/ladjs/lad#continuous-integration-and-code-coverage))
397+
* `MONGO_USER` - mongodb username
398+
* `MONGO_PASS` - mongodb password
399+
* `MONGO_HOST` - (default: `localhost`) - mongodb hostname
400+
* `MONGO_PORT` - (default: `27017`) - mongodb port
401+
* `MONGO_NAME` - (default: `{{APP_NAME}}_{{NODE_ENV}}`) - mongodb name
402+
* `MONGO_URI` - (default: `mongodb://{{MONGO_HOST}}:{{MONGO_PORT}}/{{MONGO_NAME}}`) - mongodb connection URI
403+
* `WEB_MONGO_USER` - [ladjs/web][] mongodb username
404+
* `WEB_MONGO_PASS` - [ladjs/web][] mongodb password
405+
* `WEB_MONGO_HOST` - [ladjs/web][] mongodb hostname
406+
* `WEB_MONGO_NAME` - [ladjs/web][] mongodb name
407+
* `WEB_MONGO_PORT` - [ladjs/web][] mongodb port
408+
* `WEB_MONGO_URI` - [ladjs/web][] mongodb connection URI
409+
* `API_MONGO_USER` - [ladjs/api][] mongodb username
410+
* `API_MONGO_PASS` - [ladjs/api][] mongodb password
411+
* `API_MONGO_HOST` - [ladjs/api][] mongodb hostname
412+
* `API_MONGO_NAME` - [ladjs/api][] mongodb name
413+
* `API_MONGO_PORT` - [ladjs/api][] mongodb port
414+
* `API_MONGO_URI` - [ladjs/api][] mongodb connection URI
415+
* `BREE_MONGO_USER` - [breejs/bree][] mongodb username
416+
* `BREE_MONGO_PASS` - [breejs/bree][] mongodb password
417+
* `BREE_MONGO_HOST` - [breejs/bree][] mongodb hostname
418+
* `BREE_MONGO_NAME` - [breejs/bree][] mongodb name
419+
* `BREE_MONGO_PORT` - [breejs/bree][] mongodb port
420+
* `BREE_MONGO_URI` - [breejs/bree][] mongodb connection URI
421+
* `REDIS_PORT` - (default: `6379`) - redis port
422+
* `REDIS_HOST` - (default: `localhost`) - redis hostname
423+
* `REDIS_PASSWORD` - redis password
424+
* `WEB_REDIS_PORT` - [ladjs/web][] redis port
425+
* `WEB_REDIS_HOST` - [ladjs/web][] redis hostname
426+
* `WEB_REDIS_PASSWORD` - [ladjs/web][] redis password
427+
* `API_REDIS_PORT` - [ladjs/api][] redis port
428+
* `API_REDIS_HOST` - [ladjs/api][] redis hostname
429+
* `API_REDIS_PASSWORD` - [ladjs/api][] redis password
430+
* `BREE_REDIS_PORT` - [breejs/bree][] redis port
431+
* `BREE_REDIS_HOST` - [breejs/bree][] redis hostname
432+
* `BREE_REDIS_PASSWORD` - [breejs/bree][] redis password
433+
* `MANDARIN_REDIS_PORT` - [mandarin][] redis port
434+
* `MANDARIN_REDIS_HOST` - [mandarin][] redis hostname
435+
* `MANDARIN_REDIS_PASSWORD` - [mandarin][] redis password
436+
* `CERTBOT_WELL_KNOWN_NAME` - letsencrypt wellknown name (see [certbot options][])
437+
* `CERTBOT_WELL_KNOWN_CONTENTS` - letsencrypt wellknown contents (see [certbot options][])
438+
* `VERIFICATION_PIN_TIMEOUT_MS` - (default: `5m`) - email verification pin expiry
439+
* `VERIFICATION_PIN_EMAIL_INTERVAL_MS` - (default: `1m`) - email verification pin email interval
440+
* `API_SECRETS` - (default: `secret`) - list of restricted api secrets
441+
* `CACHE_RESPONSES` - (default: `false`) - cache specified responses (see [ladjs/koa-cache-responses](https://github.com/ladjs/koa-cache-responses))
442+
* `SLACK_API_TOKEN` - slack api token (see [slack web api](https://slack.dev/node-slack-sdk/web-api))
443+
347444
#### SSL Configuration
348445

349446
To configure SSL for the web or API server simply set them in your `.env` file or pass them as environment variables.
@@ -907,3 +1004,23 @@ If you are seeking permission to use these trademarks, then please [contact us](
9071004
[occams-razor]: https://en.wikipedia.org/wiki/Occam%27s_razor
9081005
9091006
[dogfooding]: https://en.wikipedia.org/wiki/Eating_your_own_dog_food
1007+
1008+
[ladjs/web]: https://github.com/ladjs/web
1009+
1010+
[ladjs/api]: https://github.com/ladjs/api
1011+
1012+
[ladjs/proxy]: https://github.com/ladjs/proxy
1013+
1014+
[breejs/bree]: https://github.com/breejs/bree
1015+
1016+
[ladjs/passport]: https://github.com/ladjs/passport
1017+
1018+
[google auth]: https://github.com/ladjs/lad#google-auth
1019+
1020+
[ladjs/i18n options]: https://github.com/ladjs/i18n#options
1021+
1022+
[mandarin]: https://github.com/niftylettuce/mandarin
1023+
1024+
[cabinjs options]: https://github.com/cabinjs/axe#options
1025+
1026+
[certbot options]: https://certbot.eff.org/docs/using.html#id11

0 commit comments

Comments
 (0)