Skip to content

Implement todo API#243

Open
jazferlex wants to merge 1 commit intoZeff01:mainfrom
jazferlex:jazfer-licaros/1-2-years-backend
Open

Implement todo API#243
jazferlex wants to merge 1 commit intoZeff01:mainfrom
jazferlex:jazfer-licaros/1-2-years-backend

Conversation

@jazferlex
Copy link

This PR implements a simple REST API for managing todos using Express.

Features:

  • GET /api/todos - Retrieve all todos
  • GET /api/todos/:id - Retrieve a single todo by ID
  • POST /api/todos - Create a new todo
  • PUT /api/todos/:id - Update an existing todo
  • DELETE /api/todos/:id - Delete a todo

Details:

  • Data is stored in memory (no database)
  • Each todo includes: id, title, completed, createdAt
  • Basic validation and error handling implemented
  • Proper HTTP status codes returned (400, 404, 201, 204)

Tested using curl to verify all endpoints and edge cases.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant

Comments