β¬οΈ Main Note
https://docs.google.com/document/d/1SA-n3NcyEoU5nVddSYL2QsfVKk15CYRxiD7rmKIMDyA/edit
brew services
: Check the brew that's currently running.
brew services start [file]
brew services stop [file]
show databases
use local
: I'm telling the computer to go the the local inside the database.
show collections
=> Call out the data inside the local.
db.product.insert({ seller: "JB", name: "book", price: 5000 })
: literally inserting a new data inside the database with the name of product.
There are currently two servers running on: API server and database server.
To group these servers, we're using docker-compose
.
--> The port-fowrading between the dockers are automatically held.
docker-compose.yaml
: creating the config file
mongo service
: API/express service
--> Service : νλμ docker νμΌ
docker-compose build
: building the connection
docker-compose up
: operate
Mongoose is a type of Documental database.
yarn add mongoose
mongoose.connect("mongodb://μμ΄νΌμ£Όμ:ν¬νΈλ²νΈ/databaseμ’
λ₯")
β¬οΈ docker-compose.yaml file
β¬οΈ Sequence