Q:

Test data generator for Mongo?

I am trying to generate json data (seed data) to be able to test my new application written in Express/MongoDb.
I tried someone online solutions like: http://json-generator.com/ but I was wondering if there's a npm package for that?

A:

This process is known as Database seeding.

Database seeding is the initial seeding of a database with data. This is often an automated process that is executed upon the initial setup of an application. The data can be dummy data or necessary data such as an initial administrator account.

You can use npm package Faker to generate random data and seed the data in your db.
You can use npm package node-migrate to seed with commands.

