/Best-Buy

Primary LanguageJavaScript

Best-Buy

It is an ecommerce website with features such as user authentication and add to cart.

Run Locally

Clone the project

  git clone https://github.com/KGan31/Best-Buy

Go to the project directory

  cd Best-Buy

Setting up backend

  cd backend

Install dependencies

  npm install

Start the server

  npm run dev

Setting up frontend

  cd frontend

Install dependencies

  npm install

Connect backend to frontend

  cd components/helper.js
  Change BASE_URL = ADDRESS_OF_SERVER

Upload images to cloudinary

  cd pages/Sell.js
  Change cloudinary_response = await fetch(`https://api.cloudinary.com/v1_1/${CLOUDINARY_CLOUD_NAME}/image/upload`)

Start the server

  npm run start

Environment Variables

To run this project, you will need to add the following environment variables to your .env file

Setup environment variables for backend

  cd backend
  type nul> .env

Add the following variables:

PORT

MONGO_URI

SECRET

CLOUD_NAME (Cloudinary cloud name)

CLOUD_KEY (Cloudinary cloud key)

CLOUD_KEY_SECRET (Cloudinary cloud key secret)

Deployment

To checkout the project visit:

https://64da3a4b708b8048a8d1c425--stellular-cendol-13d4af.netlify.app/#/

Demo

Video Demo Link: https://youtu.be/5no363zm1N8