A simple and reusable REST API template for managing todos.
Built with Node.js, Express, and JSON file-based storage.
Perfect for learning, prototyping, or bootstrapping backend systems.
- ⚡ CRUD API for Todos
- 📂 JSON file persistence
- 🧪 Jest + Supertest test suite
- 🧑💻 Modular folder structure
- 📦 Docker-ready (optional)
git clone https://github.com/your-username/express-todo-api-template.git
cd express-todo-api-template
npm install
npm start
Method | Endpoint | Description |
---|---|---|
GET | /api/todos |
Get all todos |
POST | /api/todos |
Create a new todo |
PUT | /api/todos/:id |
Update an existing todo |
DELETE | /api/todos/:id |
Delete a todo |
npm test
Tests use a mock JSON file todos_test.json
to prevent polluting production data.
controllers/
data/
routes/
tests/
server.js
package.json
MIT License — feel free to fork & extend!