-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathrun.sh
More file actions
executable file
·22 lines (22 loc) · 788 Bytes
/
run.sh
File metadata and controls
executable file
·22 lines (22 loc) · 788 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
case $1 in
"run")
docker compose run -p 9090:9090 marketsvc
;;
"customers")
curl http://localhost:9090/api/customers
;;
"custorders")
curl http://localhost:9090/api/orders?cust_id=${2:-1}
;;
"ordertotal")
curl http://localhost:9090/api/order_total?order_id=${2:-1}
;;
"ordersbet")
curl "http://localhost:9090/api/orders_between_dates?after=2024-03-14&before=2024-03-22"
;;
"neworder")
curl -H "Content-Type: application/json" -d '{"customer_id":1,"items":[{"id":2,"quantity":4},{"id":3,"quantity":6}]}' http://localhost:9090/api/add_new_order
;;
*)
echo "unknown cmd: I know [run, customers, custorders, ordertotal, ordersbet, neworder, orderstotal]"
esac