KBin/README.md

14 lines
348 B
Markdown
Raw Permalink Normal View History

2024-07-03 02:57:48 +00:00
# Shuttle shared Postgres DB with Axum
This template shows how to connect a Postgres database and use it for a simple TODO list app.
## Example usage
```bash
curl -X POST -H 'content-type: application/json' localhost:8000/todos --data '{"note":"My todo"}'
# {"id":1,"note":"My todo"}
curl localhost:8000/todos/1
# {"id":1,"note":"My todo"}
```