Add 4 new endpoints to the Todo API we worked on class. Make sure to follow the RESTFull conventions
- creates a todo item (retuns the created item)
- deletes a todo item by id (retuns the deleted item)
- get a todo item by id (retuns the item)
- updates a todo item by id (retuns the updated item)
Add a .env
file and set it to your local database querystring
eg: DATABASE_URL="mysql://root:123456@localhost:3306/tododb"
Check the following documentation if you need help with prisma specific syntax: https://www.prisma.io/docs/concepts/components/prisma-client/crud