The project is under construction.
Read about process.exit
-
- Name the database in
constants
file. - Install the required npm packages like
mongoose
andexpress
. - Define a function in
db/index.js
to connect with the database. - connect with the database in the
index.js
file.
- Name the database in
-
- Bcrypt and JWT are used in these files.
npm i bcrypt jsonwebtoken
- Define
apiResponse
,apierror
andasyncHandler
in the utils file.
-
- Set up account on Cloudinary
- Read about
multer
andfs
module.
npm i multer
- Configure cloudinary and define a function to upload files in
utils/cloudinary.js
. - Define a middleware in
middleware
to handle unlinking file from local server using multer.
-
- Setup routes and connect it with multer middleware and controllers.
- Use everything made till now to design the code to register a user.