Working with MongoDB

MongoDB is a popular document database that is commonly used in JavaScript applications. The project in the "start" folder has been modified to write values to a MongoDB database. That database doesn't exist. You'll need to create it, run the application a few times, and then query it to ensure that there are records being saved.

  • Open the Cosmos DB extension

  • Connect to "mongodb://mongo"

  • Create a new database called "lamp"

  • Create a new collection called "colors"

  • Run the application with npm start

  • Change the colors a few times

  • Open a new Mongo DB scrapbook

  • Query the "colors" collection to see the records

Last updated