Skip to content

Script to import data into MongoDB from JSON file or delete data from MongoDB

Notifications You must be signed in to change notification settings

AngyD/json-to-mongo

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

5 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

JSON TO MONGO

Hi 🖐️, this Node.js script is designed to be run from the terminal, allowing users to populate a MongoDB collection with data from a JSON file and, if necessary, delete the collection at a later time. The script uses the Express framework, Mongoose for MongoDB interactions, and dotenv for environment variable management.

To import data:

$ node json-to-mongo.js --import

To delete data:

$ node json-to-mongo.js --delete

That's it! Hope it helps. 😉

About

Script to import data into MongoDB from JSON file or delete data from MongoDB

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published