This is a web application for an e-commerce store that sells games. It is built using the MERN stack and Microservices Architecture. It has a user interface for the customers to view the products and add them to their cart. The application is built using the Microservices Architecture, where each service is a separate Node.js application.
Use the package manager npm to install dependencies.
npm install
- Create a .env file in the root directory and add the following environment variables (replace all #### with your own values):
PORT=####
MONGO_USERNAME=####
MONGO_PASSWORD=####
MONGO_CLUSTER=####
MONGO_DBNAME=####
ACCESS_TOKEN=####
- Run the following command to start the application:
npm run dev
- Open the following URL in your browser:
http://localhost:<port_no>/
- Or you can use docker-compose to run the application:
docker-compose up
- Show the running containers:
docker ps
- Get the container ip address:
docker inspect <container_id> | grep "IPAddress"
- Open the following URL in your browser:
http://<container_ip_address>:<port_no>/
- To run the frontend application, run the following command:
cd frontend
npm install
npm run dev
- Open the following URL in your browser:
http://localhost:5173/