fix(module): read port and host from options/cli before fallback

master
Pooya Parsa 2020-01-30 23:10:26 +01:00
parent 84eed9014d
commit bc58738c6b
1 changed files with 2 additions and 0 deletions

View File

@ -14,6 +14,7 @@ function httpModule (_moduleOptions) {
moduleOptions.port ||
process.env.PORT ||
process.env.npm_package_config_nuxt_port ||
(this.options.server && this.options.server.port) ||
3000
// Default host
@ -22,6 +23,7 @@ function httpModule (_moduleOptions) {
moduleOptions.host ||
process.env.HOST ||
process.env.npm_package_config_nuxt_host ||
(this.options.server && this.options.server.host) ||
'localhost'
/* istanbul ignore if */