a simple echo server used to learn load balancer, dispatcher, CDN, WAF, Reverse Proxy
520
The Echo Server is a simple Node.js application built with Express.js that intercepts all incoming HTTP requests and responds with detailed information about the request, the system, and the environment. https://github.com/mauriciolobo/echoserver
Install dependencies:
npm install
Start the server:
node src/index.js
The server will be running at http://localhost:3000.
Pull the Docker image from Docker Hub:
docker pull mauriciolobo/echoserver:latest
Run the container:
docker run -p 3000:3000 mauriciolobo/echoserver:latest
The server will be accessible at http://localhost:3000.
The server intercepts all HTTP requests and responds with a JSON object containing the following sections:
{
"request": {
"method": "GET",
"path": "/",
"headers": { ... },
"query": {},
"body": {},
"params": {},
"cookies": {},
"ip": "::1",
"remoteAddress": "::1",
"protocol": "http",
"secure": false,
"originalUrl": "/",
"baseUrl": "",
"hostname": "localhost",
"subdomains": []
},
"system": {
"hostname": "my-host",
"platform": "linux",
"arch": "x64",
"cpus": 4,
"totalmem": 16777216,
"freemem": 8388608,
"uptime": 12345,
"loadavg": [0.1, 0.05, 0.01],
"networkInterfaces": { ... }
},
"docker": {
"container_id": "abc123",
"pod_name": null,
"pod_namespace": null,
"pod_ip": null,
"node_name": null
},
"env": { ... }
}
This project is licensed under the MIT License.
Content type
Image
Digest
sha256:98363e54f…
Size
58.5 MB
Last updated
over 1 year ago
docker pull mauriciolobo/echoserver