This is a simple Express.js REST API that manages pens.
https://pens-api.vercel.app
GET /api/pens
Example: https://pens-api.vercel.app/api/pens
Returns a list of all pens.
GET /api/pens/{id}
Example: https://pens-api.vercel.app/api/pens/1
Returns a single pen by ID.
GET /api/pens/color/{color}
Example: https://pens-api.vercel.app/api/pens/color/red
Returns pens by given color.
Make requests to the respective endpoints using your preferred HTTP client.
The API responses will be in JSON format and follow this structure:
{
"id": 1,
"name": "Pen 1",
"color": "red"
}