- Node.js v7.7.2
- MongoDB v3.4.2
- Express v4.14
mongod
Converting CSV data to JSON data using mongoimport.Go to C:/MongoDB/Server/3.4/bin/--in 2nd terminal
mongoimport -d 'database_name' -c 'collection_name' --type csv --headerline --file 'filepath/file_name.csv'
mongo
use ipl-matches
db.matchesinfo.find().pretty()
In my case,the command is:
mongoimport -d ipl-matches -c matchesinfo --type csv --headerline --file "C:\Users\Yashwanth Kumar\Desktop\HE\ipl26a822d\matches.csv"
npm install
npm start
and then navigate to http://localhost:3000/seasons in the browser.