forked from rhythm-patel/sqlalchemy-workshop
-
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) · 747 Bytes
/
run.sh
File metadata and controls
executable file
·22 lines (22 loc) · 747 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")
python3.12 marketsvc/server.py
;;
"customers")
curl http://localhost:9090/api/customers
;;
"custorders")
curl http://localhost:9090/api/orders/${2:-1}
;;
"ordertotal")
curl http://localhost:9090/api/order_total/${2:-1}
;;
"ordersbet")
curl "http://localhost:9090/api/orders_between_dates/2024-03-22/2024-03-14"
;;
"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