Skip to content

neha-gunta/Buy-And-Sell-At-BPHC

Repository files navigation

Buy and Sell At BPHC

Frontend-> React JS

Backend-> Node JS & Express JS

Database-> MongoDB

Installation process

  1. clone the repo using this command

    git clone https://github.com/neha-gunta/Buy-And-Sell-At-BPHC.git
  2. install npm packages

    1. install backend packages
    cd mern-ecommerce
    npm install
    1. install frontend packages
    cd client
    npm install
  3. go to the parent folder of mern-ecommerce & create .env for connection, JWT_SECRET, BRAINTREE_MERCHANT_ID, BRAINTREE_PUBLIC_KEY and BRAINTREE_PRIVATE_KEY.

    cd mern-ecommerce
    sudo nano .env

    (ctrl+x to save & nano follow instruction there)

    sample code for backend .env
    MONGODB_URI=YOUR_MONGODB_URI
    JWT_SECRET=YOUR_JWT_SECRET
    
  4. create another .env file inside client directory for REACT_APP_API_URL.

    cd mern-ecommerce/client
    sudo nano .env
    sample code for frontend .env
    REACT_APP_API_URL=YOUR_API_URL
    Instructions:
    1. for mongodb atlas database creation follow this tutorial->https://www.youtube.com/watch?v=KKyag6t98g8
    2. you can use any random string as JWTSECRET
    3. for localhost REACT_APP_API_URL is http://localhost:5000/api but for heroku (server deployment) it will be different
    4. note: add .env on .gitignore

    5. for server deployment use secrets directly
  5. deploy this project on your local server by using this command

    cd mern-ecommerce
    npm run dev

    note: both backend & frontend server will start at once with the above command.

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages