George Katsanos
George Katsanos

Reputation: 14175

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?

Upvotes: 3

Views: 5439

Answers (2)

Alex
Alex

Reputation: 1

You can also try the benerator community edition, we just added mongo DB support in our new version rapiddweller-benerator-ce 3.0.0.

check our project on github

Upvotes: 0

Raghav Garg
Raghav Garg

Reputation: 3707

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.

Upvotes: 5

Related Questions