Skip to content

Commit 1add7e5

Browse files
Lucas BeloLucas Belo
authored andcommitted
Instructions to test the server locally
1 parent c11c45f commit 1add7e5

File tree

1 file changed

+20
-0
lines changed

1 file changed

+20
-0
lines changed

README.md

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -66,3 +66,23 @@ sudo chown -R $user: docker
6666
```
6767

6868
Where `$user` is your Docker user.
69+
70+
## Testing the server
71+
72+
# Create a task:
73+
74+
```bash
75+
$ curl --location --request POST 'http://localhost:8000/api/create-task' \
76+
--header 'Authorization: eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJjb2duaXRvOnVzZXJuYW1lIjoiam9obkBkb2UuY29tIn0.6UvNP3lIrXAinXYqH4WzyNrYCxUFIRhAluWyAxcCoUc' \
77+
--header 'Content-Type: application/json' \
78+
--data-raw '{
79+
"title": "Jump"
80+
}'
81+
```
82+
83+
# List open tasks:
84+
85+
```bash
86+
curl --location --request GET 'http://localhost:8000/api/open-tasks' \
87+
--header 'Authorization: eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJjb2duaXRvOnVzZXJuYW1lIjoiam9obkBkb2UuY29tIn0.6UvNP3lIrXAinXYqH4WzyNrYCxUFIRhAluWyAxcCoUc'
88+
```

0 commit comments

Comments
 (0)