Skip to content

Commit

Permalink
fix(module): read port and host from options/cli before fallback
Browse files Browse the repository at this point in the history
  • Loading branch information
pi0 committed Jan 30, 2020
1 parent 84eed90 commit bc58738
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions lib/module.js
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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 */
Expand Down

0 comments on commit bc58738

Please sign in to comment.