Skip to content

rachfop/shopping-cart

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

10 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Shopping cart course

source venv/bin/activate
# terminal one
python main.py
# terminal two
flask run
# terminal three: Start client
curl -X POST http://localhost:5000/user@example.com

Start client

curl -X POST http://localhost:5000/user@example.com

Add item to cart

curl -X POST -H "Content-Type: application/json" -d '{"id": 1}' http://localhost:5000/user@example.com/add_to_cart

Remove item from cart

curl -X DELETE -H "Content-Type: application/json" -d '{"id": 1}' http://localhost:5000/user@example.com/remove_from_cart

Get cart details

curl -X GET http://localhost:5000/user@example.com/cart

Checkout

curl -X POST http://localhost:5000/user@example.com/checkout

Run together

curl -X POST http://localhost:5000/user@example.com
curl -X POST -H "Content-Type: application/json" -d '{"id": 0}' http://localhost:5000/user@example.com/add_to_cart
curl -X POST -H "Content-Type: application/json" -d '{"id": 1}' http://localhost:5000/user@example.com/add_to_cart
curl -X GET http://localhost:5000/user@example.com/cart
curl -X DELETE -H "Content-Type: application/json" -d '{"id": 1}' http://localhost:5000/user@example.com/remove_from_cart
curl -X GET http://localhost:5000/user@example.com/cart
curl -X POST http://localhost:5000/user@example.com/checkout

Terminate Workflow

temporal workflow terminate --workflow-id shopping-cart-workflow-user@example.com

Delete Schedule

temporal schedule delete --schedule-id workflow-schedule-id-user@example.com

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages