-2sopg
Last Updated: February 25, 2016
·
7.36K
· toymachiner62
69ef5d19ed581a0fcc98857d0e89527d

Quickly populate your mongo db with .json files

If you ever wanted to quickly populate your mongo db with .json files in a node project, similar to how rails seed data works, it's now possible.

If you have a set of .json files with data for each collection just head on over to https://github.com/toymachiner62/node-mongo-seeds and follow the readme.

The way it works is that if you create a /seeds folder in your project and put a file called users.json in there, the library creates a mongo collection called users and populates it with the json data in users.json.

Say Thanks
Respond