4 ms·
This is cool and useful, but there are still some pieces missing: For one, the data is just a javascript object, and is not pulled from a database. There is als
by cx1000 10y ago
This is cool and useful, but there are still some pieces missing: For one, the data is just a javascript object, and is not pulled from a database. There is also a lot that can be automated when making a REST api. For example, Django+Django REST Framework allows you to define models and serializers and BOOM you have a browsable API, as well as all POST/GET/PUT/PATCH/DELETE REST API endpoints created. I assume there is something out there like this for node, but the author doesn't mention it.
It ends with "...we should have endpoints for updating a hero and deleting a hero, but we’ll leave that for you to implement."
I'd rather not... Can't a library set those up for me?
- mjhea0 10y agoYes, you should definitely automate the creation of an API. The point of this post is more on how to set up the tooling for handling types in JavaScript with TypeScript.