mirror of
https://github.com/typicode/json-server.git
synced 2025-07-27 20:23:34 +08:00
Update message
This commit is contained in:
@ -100,7 +100,9 @@ module.exports = function (argv) {
|
|||||||
|
|
||||||
// Be nice and create a default db.json if it doesn't exist
|
// Be nice and create a default db.json if it doesn't exist
|
||||||
if (is.JSON(source) && !fs.existsSync(source)) {
|
if (is.JSON(source) && !fs.existsSync(source)) {
|
||||||
console.log(chalk.gray(` ${source} doesn't seem to exist, creating one`))
|
console.log(chalk.yellow(` Oops, ${source} doesn't seem to exist`))
|
||||||
|
console.log(chalk.yellow(` Creating ${source} with some default data`))
|
||||||
|
console.log()
|
||||||
fs.writeFileSync(source, JSON.stringify(example, null, 2))
|
fs.writeFileSync(source, JSON.stringify(example, null, 2))
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user