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
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
- Slides
- MongoDB Tutorial 3: Create A Database
- process-env-node-env-is-undefined
- invalid-schema-expected-mongodb
- MongoDB node quick start
- DB collection not found
- Avoid “current URL string parser is deprecated” warning by setting useNewUrlParser to true
- Starting with Authentication (A tutorial with Node.js and MongoDB)
- Node.js Login System With Passport
- Node.js + Express - Tutorial - Insert and Get Data with MongoDB