Todo List Endpoints¶
In order to make our REST API fully functional we will need the following endpoints which we will be available from our client React.js application:
-
/todo POST - endpoint responsible for adding new todo to the database with
title
provided by user -
/todos GET - endpoint that will server all todos from the database
-
/todo/:id DELETE - endpoint that will delete the specific todo from the database by
id
provided from the client application -
/todo/:id PUT - endpoint that will toggle
is_done
status of a todo item
Before creating these endpoints, let's first create mongoose Schema
and Model
for our todo item.
Read a lot more content with a free account.
Get access to our content and help us create even more great content by supporting us! ππ―
Login here