$ make proto
$ make server
Pertama jalankan API gateway Kedua jalankan Auth service Ketiga jalankan Product service Keempat jalankan Order service
Register User
curl --request POST --url http://localhost:3000/auth/register --header 'Content-Type:application/json' --data '{"email": "allrested@gmail.com","password": "admin"}'
Login User
curl --request POST --url http://localhost:3000/auth/login --header 'Content-Type:application/json' --data '{"email": "allrested@gmail.com","password": "admin"}'
Create Product
curl --request POST --url http://localhost:3000/product --header 'Authorization: Bearer YOUR_TOKEN' --header 'Content-Type: application/json' --data '{ "name": "Product A", "stock": 5, "price": 15}'
Find One Product
curl --request POST --url http://localhost:3000/product/1 --header 'Authorization: Bearer YOUR_TOKEN'
Create Order
curl --request POST --url http://localhost:3000/order --header 'Authorization: Bearer YOUR_TOKEN' --header 'Content-Type:application/json' --data '{"productId": "1","quantity": "1"}'