This is an API for ecommerce website selling products. It is build on top of Express.js
, NODE
and MongoDB Atlas
.
To use this project follow these steps : 👇
- Clone this github repository.
git clone https://github.com/RohitSingh2k/ecommerce-api.git
- Change directory to ecommerce-api.
cd ecommerce-api
- Add an
.env
file into this folder and add the details provided 👇.MONGO_URL=<add your mongodb uri here> PASS_SEC=<add any string here as a password security key without double qoutes(")> JWT_SEC=<add any string here without double qoutes(")>
- Check for
npm
andnode
installation in your syatem.node -v npm -v
- Install
yarn
package manager.npm i -g yarn
- Install the required dependencies of the project.
yarn install
- To start server use the commad 👇.
yarn start
- Wait for the DB connection.
yarn run v1.22.17
$ nodemon index.js
[nodemon] 2.0.15
[nodemon] to restart at any time, enter `rs`
[nodemon] watching path(s): *.*
[nodemon] watching extensions: js,mjs,json
[nodemon] starting `node index.js`
Backend server is running!
DB Connection Successfull!
🤩 you are all set you API is up and running 👍🏻