Skip to content

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:

  1. /todo POST - endpoint responsible for adding new todo to the database with title provided by user

  2. /todos GET - endpoint that will server all todos from the database

  3. /todo/:id DELETE - endpoint that will delete the specific todo from the database by id provided from the client application

  4. /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.