Create a simple TODO API using Express with TypeScript. Include basic CRUD endpoints for managing todo items.
I'll set up a TODO API with Express and TypeScript. Let me create the project files.
Now let me install the dependencies.
The TODO API is ready. Here's what I created:
/api/todosRun npm run dev to start the development server. You can test the API with:
# Create a todo
curl -X POST http://localhost:3000/api/todos \
-H 'Content-Type: application/json' \
-d '{"title": "Buy groceries"}'
# List all todos
curl http://localhost:3000/api/todos