learnig microservice architecture
docker ps
docker run -d -p 27017:27017 --name shopping-mongo mongo[image name]
docker start shopping-mongo[container name]
docker logs -f shopping-mongo[container name]
docker exec -it shopping-mongo mongosh
show dbs
use CatalogDB
db.createCollection('Products')
db.Products.insert()
db.Products.insertMany()
db.Products.insertMany([{ 'Name':'Asus Laptop','Category':'Computers', 'Summary':'Summary', 'Description':'Description', 'ImageFile':'ImageFile', 'Price':54.93 }, { 'Name':'HP Laptop','Category':'Computers', 'Summary':'Summary', 'Description':'Description', 'ImageFile':'ImageFile', 'Price':88.93 } ])
show collections
db.Products.find()
db.Products.find().pretty()
db.Products.deleteOne(with brackets)
db.Products.deleteMany(with brackets)
db.Products.findOneAndDelete(with brackets)
db.Products.bulkWrite(with brackets)