From fb0a27aa987565c2882d6348feec1d0d234715fe Mon Sep 17 00:00:00 2001 From: Daniel Roe Date: Mon, 17 Jan 2022 12:52:33 +0000 Subject: [PATCH] docs: add the environment variables server preset supports (#2755) --- docs/content/3.docs/3.deployment/99.presets/server.md | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/docs/content/3.docs/3.deployment/99.presets/server.md b/docs/content/3.docs/3.deployment/99.presets/server.md index a2a1ef8442..86f0cab62f 100644 --- a/docs/content/3.docs/3.deployment/99.presets/server.md +++ b/docs/content/3.docs/3.deployment/99.presets/server.md @@ -46,6 +46,14 @@ $ node .output/server/index.mjs Listening on http://localhost:3000 ``` +## Configuring defaults at runtime + +This preset will respect the following runtime environment variables: + +- `NUXT_PORT` or `PORT` (defaults to `3000`) +- `NUXT_HOST` or `HOST` (defaults to `'localhost'`) +- `NITRO_SSL_CERT` and `NITRO_SSL_KEY` - if both are present, this will launch the server in HTTPS mode. In the vast majority of cases this should not be used other than for testing, and the Nitro server should be run behind a reverse proxy like nginx or Cloudflare which terminates SSL. + ## Server timings You can enable the `nitro.timing` option to have the logs about the chunk loading and cold start performance.