diff --git a/docs/content/3.api/5.commands/dev.md b/docs/content/3.api/5.commands/dev.md index b856027559..ef603dbbc8 100644 --- a/docs/content/3.api/5.commands/dev.md +++ b/docs/content/3.api/5.commands/dev.md @@ -21,3 +21,7 @@ Option | Default | Description 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`. + +::alert{type="info"} +If you are using a self-signed certificate in development, you will need to set `NODE_TLS_REJECT_UNAUTHORIZED=0` in your environment. +:: diff --git a/packages/nuxi/src/commands/dev.ts b/packages/nuxi/src/commands/dev.ts index d7fa527058..bd01df9b77 100644 --- a/packages/nuxi/src/commands/dev.ts +++ b/packages/nuxi/src/commands/dev.ts @@ -94,6 +94,7 @@ export default defineNuxtCommand({ const address = listener.server.address() as AddressInfo currentNuxt.options.server.port = address.port currentNuxt.options.server.host = address.address + currentNuxt.options.server.https = Boolean(args.https) await Promise.all([ writeTypes(currentNuxt).catch(console.error),