this is a good source to set up mongodb https://www.mongodb.com/developer/languages/javascript/node-connect-mongodb/
- mongodb altas : cloud database
- mongodb compass : GUI
Make sure BE data has been stored in mongodb collection successfully, here are the steps :
-
Add data in mongodb altas 1.Click in cluster
2.Add data (data in CSV format or JSON format)
-
Add data in mongodb compass (this one is more straightforward)
To start the project :
- turn on mongodb
- make sure in server.js mongodb already connect successfully through uri
- terminal : node server.js