- cd frontend
- npx create-react-app frontend
- npm install react-router-dom
- npm i axios
- npm install redux react-redux
- npm install redux-thunk
- npm install js-cookie
- npm install react-paypal-button-v2
To start the frontend server:
- npm start
- REDUCER:
- Input is State and Action and Output is new Action
- PROVIDER:
- THUNK:
- Middleware for redux.
- Allows to run async operations in action in redux.
- cd backend
- npm init -y
- npm install express
- npm install @babel/cli @babel/core @babel/node @babel/preset-env nodemon
- npm install dotenv
- npm install mongoose
- npm install jsonwebtoken
- npm install body-parser
- npm install --save express-async-handler
- npm install bcrypt
To start the backend server:
- node server.js
- This will give out error because of ES6 conversion.
- npm install @babel/cli @babel/core @babel/node @babel/preset-env nodemon
- setup .babelrc
- npm start
- brew tap mongodb/brew
- brew install mongodb-community
- brew services start mongodb-community
- killall -9 node
- pkill -f node
Visit: http://localhost:5000/api/products/
- React & Node Tutorial - Full ECommerce in 5 Hours [2020] : https://www.youtube.com/watch?v=Fy9SdZLBTOo
- https://github.com/basir/node-react-ecommerce
- https://www.youtube.com/watch?v=TRCDsB9i3bI
-
Proceed to Checkout