- npm init
- create.gitkeep for push the empty file.
- create.gitignore for hiding the secure file.
- create .env file
- create src folder
- src/index.js is the entry file for this project
- install nodemon for auto running the server npm i -D nodemon (-D for devDependencies)
- "dev": "nodemon src/index.js"
- src/ mkdir controllers db middlewares models routes utils
- npm i express mongoose dotenv
- npm i cookie-parser cors (cors -> cross-origin resource sharing)
- npm install mongoose-aggregate-paginate-v2
- npm install bcrypt (A library to help you hash passwords.)
- npm isntall jsonwebtoken (An implementation of JSON Web Tokens.)
- npm install cloudinary (Cloudinary is a cloud service that offers a solution to a web application's entire image management pipeline.)
- npm install multer (Multer is a node.js middleware for handling multipart/form-data, which is primarily used for uploading files.)
"dev": "nodemon -r dotenv/config --experimental-json-modules src/index.js"
- connect database (db folder)
- define constants.js file
- configuration express at app.js file
- utils/asyncHandler.js ->
- utils/errorHandler.js->Handling Errors
- utils/ApiResponse.js -> Handling Response
- models /user.js-> create user schema and model,implement bcryptjs for password hashing.
- models/video.js
- setup the cloudinary