Skip to content

Commit d9f5b61

Browse files
author
Vikram Vaswani
committed
Update README
Signed-off-by: Vikram Vaswani <vikram@dagger.io>
1 parent 68294c9 commit d9f5b61

File tree

1 file changed

+23
-0
lines changed

1 file changed

+23
-0
lines changed

README.md

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1 +1,24 @@
1+
## Run the application with Docker Compose
12

3+
```
4+
docker compose up
5+
```
6+
7+
## Write to the API
8+
9+
```
10+
curl -X POST -H "Content-Type: application/json" -d '{"title": "Dune", "author": "Frank Herbert"}' http://localhost:8000/api/books/
11+
```
12+
13+
## Read from the API
14+
15+
```
16+
curl http://localhost:8000/api/books/
17+
```
18+
19+
## Run tests
20+
21+
```
22+
docker exec -it fastapi_app bash
23+
pytest # in the container shell
24+
```

0 commit comments

Comments
 (0)