mirror of
https://github.com/typicode/json-server.git
synced 2025-08-02 19:52:20 +08:00
CLI listen to 'localhost' by default, instead of '0.0.0.0'
This commit is contained in:
@ -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'))
|
||||
|
Reference in New Issue
Block a user