Backend code for a fullstack (MERN) ecommerce project
Frontend Link - Medico
For frontend check this repo - Click Here
API Link - Medico
Lakshay Saini
- Github: @lakshay-saini-au8
- Linkedin: @lakshay-saini-dev
For development, you will only need Node.js and a node global package installed in your environement.
$ git clone git@github.com:lakshay-saini-au8/medico-backend.git
$ cd medico-backend
Run npm install
$ npm i
$ npm run dev
.env file in the root and edit it with your credentials. You will need:
- PORT = 9999
- MONGODB_CLOUD_URL=
Your Database Address
- SECRET_KEY=
your secret key
-
bcrypt
- We are using bcrypt module to hash password of the user. It's an npm module that you can find it out here at bcrypt. -
cors
- It is used as a middleware in Node.JS. Check it out here - cors. -
dotenv
- It is used to load environment variables from a .env file into process.env. You can find it out here - dotenv. -
express
- It's the web framework for Node.js that we used to structure our web application. You can find more details here express. -
jsonwebtoken
- We used to create access tokens for our application. For more details check here - jsonwebtoken. -
mongoose
- We used Mongoose because it provides a schema-based solution to model our application data with MongoDB. Which has many features to use example - validation of user's data. For more details check here - mongoose. -
joi
- we have used this for validating data --> data sent in req.body. - joi. -
morgan
- it is a logger middleware, which basically logs api call with status on the terminal and helps us (developers) to know that which api was called- morgan.