storefront
A small shop API used to demo NewGit.
| Name | Size |
|---|---|
| docs | |
| cart.go | 852 B |
| CHANGELOG.md | 98 B |
| go.mod | 39 B |
| main.go | 311 B |
| products.go | 632 B |
| README.md | 400 B |
README.md
storefront
A small shop API: products, a cart and checkout.
Run
go run .
The server listens on :8080.
Endpoints
| Method | Path | What it does |
|---|---|---|
| GET | /products | List products |
| GET | /products/{id} | One product |
| POST | /cart | Add an item |
| GET | /cart | Show the cart and its total |
See docs/api.md for request and response bodies.