CLI listen to 'localhost' by default, instead of '0.0.0.0'

This commit is contained in:
typicode
2018-06-09 01:16:41 +02:00
parent fa23dd1c4b
commit 6cdcb32aac
4 changed files with 7 additions and 5 deletions

View File

@ -18,7 +18,7 @@ module.exports = function() {
host: {
alias: 'H',
description: 'Set host',
default: '0.0.0.0'
default: 'localhost'
},
watch: {
alias: 'w',

View File

@ -16,9 +16,7 @@ const example = {
}
function prettyPrint(argv, object, rules) {
const host = argv.host === '0.0.0.0' ? 'localhost' : argv.host
const port = argv.port
const root = `http://${host}:${port}`
const root = `http://${argv.host}:${argv.port}`
console.log()
console.log(chalk.bold(' Resources'))