- Initialized the app in following manner :
npm install express
npm install --save-dev nodemon
touch server.js
touch .gitignore
npm i mongoose
npm i dotenv
npm i eslint
- Did setup of eslint with following options
npm init @eslint/config
✔ How would you like to use ESLint? · To check syntax, find problems, and enforce code style
✔ What type of modules does your project use? · commonjs
✔ Which framework does your project use? · none
✔ Does your project use TypeScript? · No
✔ Where does your code run? · node
✔ How would you like to define a style for your project? · guide
✔ Which style guide do you want to follow? · airbnb
✔ What format do you want your config file to be in? · JavaScript
npm i express-fileupload
npm i express-validator
npm i cloudinary
npm i bcryptjs
npm i jsonwebtoken
npm i cors
server.js
- Entry point for the backend server/routes
- Folder for all routes/models
- Folder for all schemas/utils
- Folder for extra utility functions/middleware
- Folder for middlewares/config
- Folder for any configuration setups/controllers
- To manage some business logic out of routes.
👉🏻👉🏻 Here are the learnings learnt from while developing this project.