4.8.1_MongoDB_notes - MartijnKeesmaat/dating-app GitHub Wiki

Mongo

  • MongoDB stores data in flexible, JSON-like documents, meaning fields can vary from document to document and data structure can be changed over time
  • The document model maps to the objects in your application code, making data easy to work with
  • MongoDB stores documents in collections

Credits @Mongo docs

Commands

  • show dbs
  • use insertDBNameHere
  • db.mDB.insert({"name": "Martijn"});
  • Kill process on certain port $ lsof -ti:3000 | xargs kill

Sessions

Data is passed to the database. This data is retrieved by the session id. This only information that is stored in the browser is the session id.

Sources