Skip to content

Commit e1120a9

Browse files
ooookaiPooya Parsa
authored and
Pooya Parsa
committed
feat: use server of nuxt.config.js to set default baseURL (#245)
1 parent 4583988 commit e1120a9

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

Diff for: lib/module.js

+2
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,7 @@ function axiosModule(_moduleOptions) {
1313
moduleOptions.port ||
1414
process.env.PORT ||
1515
process.env.npm_package_config_nuxt_port ||
16+
(this.options.server && this.options.server.port) ||
1617
3000
1718

1819
// Default host
@@ -21,6 +22,7 @@ function axiosModule(_moduleOptions) {
2122
moduleOptions.host ||
2223
process.env.HOST ||
2324
process.env.npm_package_config_nuxt_host ||
25+
(this.options.server && this.options.server.host) ||
2426
'localhost'
2527

2628
/* istanbul ignore if */

0 commit comments

Comments
 (0)