DEMO URL: https://it4483.cf/
Create a .env file in the root and add the following
NODE_ENV = development
PORT = 5000
MONGO_URI = your mongodb uri
JWT_SECRET = 'abc123'
Create a .env file in the frontend Directory and add the following
REACT_APP_API_DOMAIN=YOUR_API_DOMAIN #the domain that backend is running
npm install
cd frontend
npm install
# Run frontend (:3000) & backend (:5000)
npm run dev
# Run backend only
npm run server
# Run frontend only
npm run client
You can check more commands in package.json file
# Create frontend prod build
cd frontend
npm run build
You can deploy on heroku or your VPS depend on your money :)) Remember to change NODE_ENV=production in .env file when you deploy on your server.
You can use the following commands to seed the database with some sample users as well as destroy all data
# Import data
npm run data:import
npm run data:destroy
Sample User Logins
admin@example.com (Admin)
123456
test@example.com (Customer)
123456