NewGit
Sign in
07fefaf9
README.md 22 lines400 B

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.

Source
 1# storefront
 2
 3A small shop API: products, a cart and checkout.
 4
 5## Run
 6
 7```sh
 8go run .
 9```
10
11The server listens on :8080.
12
13## Endpoints
14
15| Method | Path | What it does |
16|---|---|---|
17| GET | /products | List products |
18| GET | /products/{id} | One product |
19| POST | /cart | Add an item |
20| GET | /cart | Show the cart and its total |
21
22See [docs/api.md](docs/api.md) for request and response bodies.