VeryGoodOpenSource / dart_frog

A fast, minimalistic backend framework for Dart 🎯
https://dartfrog.vgv.dev
MIT License
1.87k stars 150 forks source link

fix: At the end of the tutorial, I don't know how to check that the app is working #491

Closed wpl90 closed 1 year ago

wpl90 commented 1 year ago

Description

https://dartfrog.vgv.dev/docs/tutorials/todos#summary I got to this section, but I don't know how to get it to work at the end, so I can't get it to work.

in my browser http://localhost:8080/todos When I access the above url, [] is displayed, so I think it's working.


Update a specific todo by id

curl --request PUT \ --url http://localhost:8080/todos/ \ --header 'Content-Type: application/json' \ --data '{ "title": "Take out trash!", "isCompleted": true }' How can I check that the above part works?

felangel commented 1 year ago

Hi @wpl90 πŸ‘‹ Thanks for opening an issue!

You can verify the app is working by making the PUT request to update an existing todo item either using cURL or postman, httpie, etc. and then querying the todo via a GET request to verify that the item was updated.

Hope that helps πŸ‘

wpl90 commented 1 year ago

Hi @felangel πŸ‘‹ Thank you for your reply.

Once I got the overview of the tutorial I got it working.

Since the initial value of _cache provided by InMemoryTodosDataSource is an empty Map, it took some time to confirm that it was working properly.

I thought if you had a concrete initial value for _cache and explained how to access that value, more newbies would be able to digest your tutorial in record timeπŸš€