Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
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