Skip to content

Commit 61432a1

Browse files
author
Pooya Parsa
committed
feat: better baseURL message
1 parent a341185 commit 61432a1

File tree

2 files changed

+3
-1
lines changed

2 files changed

+3
-1
lines changed

lib/index.js

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@ const chalk = require('chalk')
22
const path = require('path')
33
const { hostname } = require('os')
44
const { URL } = require('whatwg-url')
5+
const debug = require('debug')('nuxt:axios')
56

67
module.exports = function nuxtAxios (moduleOptions) {
78
const port = process.env.PORT || process.env.npm_package_config_nuxt_port || 3000
@@ -50,7 +51,7 @@ module.exports = function nuxtAxios (moduleOptions) {
5051
})
5152

5253
/* eslint-disable no-console */
53-
console.log(`[AXIOS] Base URL: ${chalk.green(options.baseURL)} , Browser: ${chalk.green(options.browserBaseURL)}`)
54+
debug(`BaseURL: ${chalk.green(options.baseURL)} (Browser: ${chalk.green(options.browserBaseURL)})`)
5455
}
5556

5657
module.exports.meta = require('../package.json')

package.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -30,6 +30,7 @@
3030
"dependencies": {
3131
"axios": "^0.16.2",
3232
"chalk": "^2.1.0",
33+
"debug": "^3.0.1",
3334
"nuxt": "^1.0.0-rc8",
3435
"whatwg-url": "^6.1.0"
3536
},

0 commit comments

Comments
 (0)