Skip to content

graniteviper/MegaProject

Repository files navigation

Project starts...

The project is under construction.

Read about process.exit

  1. Define a file structure

  2. Set up the project on GITHUB.

  3. Setting up the database:

    • Name the database in constants file.
    • Install the required npm packages like mongoose and express.
    • Define a function in db/index.js to connect with the database.
    • connect with the database in the index.js file.
  4. Call the required middlewares in the app.js file.

  5. Create the database and models using mongoose in the models folder.

    • Bcrypt and JWT are used in these files.
    npm i bcrypt jsonwebtoken
    
    • Define apiResponse, apierror and asyncHandler in the utils file.
  6. Setting up Cloudinary to handle file uploading.

    • Set up account on Cloudinary
    • Read about multer and fs 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.
  7. Setting up of routes and controllers

    • Setup routes and connect it with multer middleware and controllers.
    • Use everything made till now to design the code to register a user.
  8. Test your data through postman.

About

a project to learn backend

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published