This repository contains the code for a full-stack MERN project that is conditionally rendered based on the user state.
- Server-side ----> PORT:8000
- Client-side ----> PORT:3000
Live Project Link: origamigrill.nicolebeechler.me
A simple e-commerce website.
- A user can log in or sign up.
- After logging in, a user can order items from the menu or view previous orders.
Items:
- GET /api/items
- GET /api/items/:id
Orders:
- GET /cart
- GET /api/orders/history
- POST /api/orders/cart/items/:id
Users:
- POST /api/users
- POST /api/users/login
- GET /api/users/check-token (middleware:
ensureLoggedIn
)
Set up your environment:
- Clone this repository.
$ [email protected]:nicolebeechler/mern-project.git
- Install Gulp and Nodemon globally
$ npm i -g gulp-cli
$ npm i -g nodemon
- Include your SHA256 SECRET hash and MONGO_URI in your
.env
file at the root level - Install the dependencies
$ npm i
- Upload the
seed.js
data file to your database
$ node config/seed.js
- MongoDB/Mongoose
- Express
- React
- Node v20
- Bcrypt - Password Hashing
- JSON Web Token - Authentication
- big-poppa-code-react-starter-kit
- DigitalOcean - Cloud Server
- Nginx - Web Server
- Certbot - SSL Certificate
- PM2 - Process manager for Node.js
- NameCheap - Domain