E-Commerce NodeJS MS adalah aplikasi berbasis microservices untuk mensimulasikan proses belanja di sebuah e-commerce yang terdiri dari 4 service:
- User Service
- Product Service
- Order Service
- Transaction Service
- Clone repo
- Copy
.env.devke.env - Ensure MongoDB & Kafka is available in the system, and update
.envfile accordingly - Run
npm run dev
- Install Docker Engine
- HOST_IP is needed to run Kafka properly. Provide HOST_IP in ENV file, then run docker-compose:
docker-compose build && docker-compose up
or get current HOST_IP directly from command:
export HOST_IP=$(ifconfig | grep -E "([0-9]{1,3}\.){3}[0-9]{1,3}" | grep -v 127.0.0.1 | awk '{ print $2 }' | cut -f2 -d: | head -n1)
docker-compose build && docker-compose up
API Documentation is provided with Postman Click here to access
Flow diagram of event between services can be viewed here: Diagram Flow