Env Variables Create a .env file in then root and add the following
NODE_ENV = development PORT = 5000 MONGO_URI = your mongodb uri JWT_SECRET = 'abc123'
Install Dependencies (frontend & backend) npm install cd frontend npm install Run
npm run dev
npm run server Build & Deploy
cd frontend npm run build There is a Heroku postbuild script, so if you push to Heroku, no need to build manually for deployment to Heroku
Seed Database You can use the following commands to seed the database with some sample users and products as well as destroy all data
npm run data:import
npm run data:destroy Sample User Logins
[email protected] (Admin) 123456
[email protected] (Customer) 123456
[email protected] (Customer) 123456