A small support-engineering portfolio project with two focused examples: a local Express API for health and item-management requests, and a Postman collection that demonstrates response checks against the public Postman Echo service.
The repository provides a compact environment for practising HTTP requests, JSON payloads, status-code checks and API troubleshooting. The Express app and Postman Echo collection are separate demonstrations; the current collection does not test the local Express endpoints.
- Health-check endpoint
- Create and list in-memory items
- JSON request parsing
- Configurable port
GETrequest with query-parameter validationPOSTrequest with JSON and schema checks- Expected
404response check - Reusable
baseUrlenvironment variable
- Node.js
- Express 4
- JSON
- Postman
Requirements:
- Node.js 18 or later
- npm
git clone https://github.com/macrovise/API-Demo.git
cd API-Demo
npm ci
cp .env.example .env
npm startThe local API listens on http://localhost:10000 unless PORT is set.
| Variable | Default | Purpose |
|---|---|---|
PORT |
10000 |
HTTP port for the Express server |
No API keys or credentials are required.
| Method | Endpoint | Purpose | Success status |
|---|---|---|---|
GET |
/health |
Confirm the service is running | 200 |
GET |
/items |
List items created since start-up | 200 |
POST |
/items |
Create an in-memory item | 201 |
POST /items
Content-Type: application/json{
"name": "Example item"
}Example response:
{
"id": 1,
"name": "Example item"
}Items are stored in memory and are cleared whenever the process restarts. If name is missing or empty, the API currently uses unnamed.
Import both files into Postman:
Select the DemoEnv environment and run the collection. It sends requests to https://postman-echo.com and checks:
- the expected HTTP status
- JSON response availability
- a returned query parameter
- response time and content type
- basic JSON response structure
- an expected
404response
Because the collection targets Postman Echo, it should not be presented as test coverage for the local Express API.
API-Demo/
|-- index.js # Express application and server
|-- package.json # Runtime dependency and start command
|-- postman_collection.json # Postman Echo request examples
|-- postman_environment.json # Public base URL and local variables
|-- .env.example # Optional port configuration
`-- README.md
- Add input validation and structured error responses to the local API
- Persist items beyond process restarts
- Create a separate Postman collection for the local endpoints
- Add automated API tests after the local request contract is finalised