Skip to content

conorheffron/cart-dart

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

31 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

cart-dart

License: GPL v3

Dart

Add dependencies

dart pub add shelf

Install dependencies

dart pub get

Run Tests

dart test

Run Server

dart run bin/main.dart

Post Item 1

curl -X POST http://localhost:8080/cart \
-H "Content-Type: application/json" \
-d '{"productId": "123", "quantity":5}'
Item added to cart%          

View Cart

curl -X GET http://localhost:8080/cart
[{"productId":"123","quantity":5}]%   

Post Item 2

curl -X POST http://localhost:8080/cart \
-H "Content-Type: application/json" \
-d '{"productId": "732", "quantity":7}'
Item added to cart%      

View Cart

curl -X GET http://localhost:8080/cart
[{"productId":"123","quantity":5},{"productId":"732","quantity":7}]%

About

Sample shopping cart app

Topics

Resources

License

Stars

5 stars

Watchers

0 watching

Forks

Packages

 
 
 

Contributors

Languages