docs: add the environment variables server preset supports (#2755)

This commit is contained in:
Daniel Roe 2022-01-17 12:52:33 +00:00 committed by GitHub
parent 0ed2d4a00b
commit fb0a27aa98
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -46,6 +46,14 @@ $ node .output/server/index.mjs
Listening on http://localhost:3000 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 ## Server timings
You can enable the `nitro.timing` option to have the logs about the chunk loading and cold start performance. You can enable the `nitro.timing` option to have the logs about the chunk loading and cold start performance.