- Clone repo on your local machine:
git cloneInstall server-side dependencies:
cd fullstack-shopping-cart
npm installInstall client-side dependencies:
cd client
npm installIn the root of the project create a .env file and replace the MONGODB_URI, and SESSION_SECRET env variable with your own
Start MongoDB in your local machine
sudo service mongod startIn server.js after mongoose.connect uncomment (if they are commented out) these two lines to seed products in your database:
const seedProducts = require('./seeds/products.js');
seedProducts();cd into ./client and build the client:
npm run buildNow navigate back to server root directory and start the server
cd ..
npm run startNow navigate to localhost:5000 and the app is running here