This repo provides a script you can use to easily import csv files into mongodb.
Add mongo-import
to your package.json
file as a development dependency.
npm install mongo-import --save-dev
or
yarn add mongo-import --dev
Update your package.json
as follows:
...
"scripts": {
...
"import": mongo-import",
...
},
...
The script assumes that the .csv files you want to import are in your local tables
folder.
npm run mongo-import
or
yarn mongo-import
- To be added
- To be added
- To be added