Home - Ajarlin/MongoDB_notes GitHub Wiki
Welcome to the MongoDB_notes wiki!
What is MongoDB
-NoSQL Database -Use it anytime you want to store data and persist it in your app -'M' in Mongo is the Mean
Model
Client(Browser)
|
|
Server(Node) -> Mongoose
|
|
MongoDB
What we are doing
CRUD: Create, Read, Update, Delete
Javascript(Node.js)
Step 1:
Installing MongoDB and Mongoose
Step 2:
Run MongoDB locally
C:>"C:\Program Files\MongoDB\Server\4.2\bin\mongod.exe"
exit -> cntrl+c
Step 3:
Create local directory
run: npm init --yes
--> creates local json file and such
step 4:
Install mongoose in the dir with save to show dependencies
npm install mongoose --save
Things to know
In mongoDb we can have n databases and with mongoose we can tell what database to connect to.