- Create express.js web-server according to Express.js - SHORT GUIDE.
- Add connection link to .env like DB_HOST=..mongodb.net/mydatabase?retryWrites..
- npm i mongoose
-
Add mongoDB connection code to server.js (or index.js).
See the Pen 14 - MongoDB connection by Andrii (@imitator) on CodePen.
Or a little bit refactored server.js (index.js) in this step. - Make CRUD (controllers) functions (recom. start from POST, b/c there is no any items in DB)
- Add "Not Found" middleware for looking unexpected route after all middlewares.
- Add middlewares according to a task ( f.e. Joi schema e.t.c. ).
- Add registration, authentication & authorization.
- Add file uploading for routes f.e. avatar, image to gallery etc..
- Cover code by tests according to a task
- Add post messages for routes, f.e. sendgrid, nodemailer etc.