Skip to content

Instantly share code, notes, and snippets.

@JamWils
Created June 8, 2017 19:06
Show Gist options
  • Save JamWils/df66e307d519f2aeae9b9ab0d415c082 to your computer and use it in GitHub Desktop.
Save JamWils/df66e307d519f2aeae9b9ab0d415c082 to your computer and use it in GitHub Desktop.
const json = mockDataSchema.schema();
const jsonFormatted = JSON.stringify(json);
fs.writeFile("./mockData/db.json", jsonFormatted, (err) => {
if (err) {
return console.log(chalk.red(err));
} else {
console.log(chalk.green("Mock data generated."));
}
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment