- Cloud Based MongoDB Server - Atlas
Connect to MongoDB Database and read write documents
- Create account on mongodb.com/atlas/database
- Cluster0 will be available by default
- ENV file reader (dotenv)
- REST APi server (express)
- Parsing Middleware (body-parser)
- Mongo Client (mongodb)
npm install --save dotenv
npm install --save express
npm install --save body-parser
npm install --save mongodb
- Copy connection string from Atlas server
- Keep secrets in
.env
file and substitute them in the connection string
Learn how to use ORM mongoose
- Create account on mongodb.com/atlas/detabase
- Cluster0 will be available by default
- ENV file reader (dotenv)
- REST APi server (express)
- Parsing Middleware (body-parser)
- Mongoose (ORM for Mongodb, mongoose)
npm install --save dotenv
npm install --save express
npm install --save body-parser
npm install --save mongoose