Skip to content

Latest commit

 

History

History
47 lines (33 loc) · 2.21 KB

README.md

File metadata and controls

47 lines (33 loc) · 2.21 KB

Ecommerce-2020

This repository contains the code for a MERN based e-commerce webapp:

Prerequisites:

  • Install Mongodb & Robo3T
  • Install React

For the backend:

To get deeper insight of the Backend of our Project Ecommerce have a look at the following steps:

  • Download the code folder from GitHub
  • Create a .env file inside the backend folder having two variables - DATABASE & SECRET. Additionally, you can add "PORT" as well if you want to connect DB at some other port.
  • Open cmd and go to the backend folder directory and run the "npm install" command
  • Go to PowerShell and run command "mongod"
  • Then "npm run". Below will appear on command prompt:

new

We'll see that the backend server is running at localhost:8000.

For testing in postman:

For the frontend:

  • Firstly, go to Robo3T and connect to localhost:27017

22

  • Now, open the command prompt for the frontend folder and run "npm install"
  • Now, run "npm start"
  • This will automatically start the deployment server Below screen will show up automatically:

deployment

  • Click on the little arrow button in right corner
  • Now, if not already registered then click on sign up and enter dummy details.
  • Now, open Robo3T, on the left bar click on books and then on users as shown below:

33

  • Edit and change the highlighted row's value i.e. "role" : 1. Since "1" is for admin.

44

  • Now, go to deployment and sign in and below screen will show up. Here you can add things to the cart, create categories, delete them etc.

6