- Both CSV and Xlsx files to mongo database model dynamically by uploading files and upload to mongo according to sheet
- Now can Generate REST API routes too
- Need to install mongoDB (https://www.mongodb.com/download-center/community)
- Need to install mongoCompass to check DB (https://www.mongodb.com/products/compass)
- Need to install node.js (https://nodejs.org/en/)
- go to project folder
- npm install
- node index.js
- call http://localhost:3000/
- upload file
- call http://localhost:3000/readfiles
- call http://localhost:3000/loadModule
- call http://localhost:3000/loadData
- call http://localhost:3000/CreateRoute
- call http://localhost:3000/loadRoute
- call http://localhost:3000/api/(your uploaded file name)
- open mongo compass
- connection string (mongodb://localhost:27017/?readPreference=primary&appname=MongoDB%20Compass%20Community&ssl=false)
- go to testapi
- use http://localhost:3000/api/(your uploaded file name)/(parameter name)/value