This is an example implementation of a restaurant review application using the Express, Node.JS, React and MongoDB (MERN) stack.
The following technologies are used:
- MongoDB (via Docker container) for the database
- Express and Node.JS for the backend API
- React for the client
The following are required:
- Docker and Docker Compose
- Node.JS (tested with v24.6.0)
The easiest way to run the entire application is using Docker Compose, which will start all services including MongoDB.
- Clone the repository
- Build and start all services:
docker-compose up --build
This will start:
- MongoDB container on port 27017
- Backend API on port 5001
- Frontend React app on port 3000
Visit http://localhost:3000 to access the application.
- MongoDB: Local MongoDB instance with persistent data storage
- Backend: Express.js API server
- Frontend: React development server
docker-compose down
To remove all data and start fresh:
docker-compose down -v
docker-compose up --build
For local development without Docker:
cd backend
npm install
Required dependencies:
- express
- cors
- mongodb
- dotenv
cd frontend
npm install
- Start MongoDB (requires local MongoDB installation)
- Start the backend:
cd backend
npm start
- Start the frontend:
cd frontend
npm start
The backend runs on port 8000 and frontend on port 3000.