mirror of
https://github.com/nuxt/nuxt.git
synced 2025-02-16 21:58:19 +00:00
fix(nuxi): respect NUXT_PORT
and NUXT_HOST
vars in dev mode (#3973)
This commit is contained in:
parent
1a39eff502
commit
df188d7734
@ -35,6 +35,8 @@ Option | Default | Description
|
||||
`--ssl-cert` |`null` | Specify a certificate for https.
|
||||
`--ssl-key` |`null` | Specify the key for the https certificate.
|
||||
|
||||
The port and host can also be set via NUXT_PORT, PORT, NUXT_HOST or HOST environment variables.
|
||||
|
||||
This command sets `process.env.NODE_ENV` to `development`. To override, define `NODE_ENV` in a `.env` file or as command-line argument.
|
||||
|
||||
## Build
|
||||
|
@ -23,8 +23,8 @@ export default defineNuxtCommand({
|
||||
const listener = await server.listen({
|
||||
clipboard: args.clipboard,
|
||||
open: args.open || args.o,
|
||||
port: args.port || args.p,
|
||||
hostname: args.host || args.h,
|
||||
port: args.port || args.p || process.env.NUXT_PORT,
|
||||
hostname: args.host || args.h || process.env.NUXT_HOST,
|
||||
https: Boolean(args.https),
|
||||
certificate: (args['ssl-cert'] && args['ssl-key']) && {
|
||||
cert: args['ssl-cert'],
|
||||
|
Loading…
Reference in New Issue
Block a user