A RESTful API for item management built with TypeScript and Express, featuring full CRUD operations with validation and error handling.
- Full CRUD functionality
- TypeScript support
- UUID-based item identification
- Request validation
- Proper error handling (400, 404, 500)
- In-memory data storage
express@5.1.0uuid@11.1.0
typescript@5.8.3ts-node@10.9.2nodemon@3.1.10@types/express@5.0.2@types/node@22.15.29
- Clone the repository:
- Install dependencies: npm install
- Development Mode (with auto-reload) npm run dev;
- Production Build npm run build;
Method Endpoint Description GET /items Get all items POST /items Create new item GET /items/:id Get specific item by ID PUT /items/:id Update item by ID DELETE /items/:id Delete item by ID Request/Response Examples Create Item (POST /items) json { "name": "New Item" } Success Response (201 Created)
json { "id": "e7edc5b4-fada-4540-909e-e51bf9a8e20f", "name": "New Item" } Validation Required Fields:
name (string, required for POST/PUT)
Error Responses:
400 Bad Request - Missing required fields
404 Not Found - Item not found
500 Internal Server Error - Server-side issues