{"id":31792808,"url":"https://github.com/riccardotornesello/hello-world-http-server","last_synced_at":"2026-02-11T21:11:48.225Z","repository":{"id":317212685,"uuid":"1066462785","full_name":"riccardotornesello/hello-world-http-server","owner":"riccardotornesello","description":"A simple Python HTTP server running in a Docker container","archived":false,"fork":false,"pushed_at":"2025-11-03T13:27:06.000Z","size":53,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":0,"default_branch":"main","last_synced_at":"2025-11-03T15:04:33.350Z","etag":null,"topics":["docker","python","testing"],"latest_commit_sha":null,"homepage":"","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/riccardotornesello.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2025-09-29T14:14:13.000Z","updated_at":"2025-11-03T13:26:06.000Z","dependencies_parsed_at":"2025-09-29T16:24:04.375Z","dependency_job_id":"b699a857-e5a8-402d-a5c7-543609188f99","html_url":"https://github.com/riccardotornesello/hello-world-http-server","commit_stats":null,"previous_names":["riccardotornesello/hello-world-http-server"],"tags_count":6,"template":false,"template_full_name":null,"purl":"pkg:github/riccardotornesello/hello-world-http-server","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/riccardotornesello%2Fhello-world-http-server","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/riccardotornesello%2Fhello-world-http-server/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/riccardotornesello%2Fhello-world-http-server/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/riccardotornesello%2Fhello-world-http-server/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/riccardotornesello","download_url":"https://codeload.github.com/riccardotornesello/hello-world-http-server/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/riccardotornesello%2Fhello-world-http-server/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":29345433,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-02-11T20:11:40.865Z","status":"ssl_error","status_checked_at":"2026-02-11T20:10:41.637Z","response_time":97,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.5:443 state=error: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["docker","python","testing"],"created_at":"2025-10-10T17:20:35.237Z","updated_at":"2026-02-11T21:11:48.217Z","avatar_url":"https://github.com/riccardotornesello.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# hello-world-http-server\n\nA simple Python HTTP server running in a Docker container. It responds to HTTP requests with detailed information about the request.\n\n## 📋 Response Information\n\nThe server responds with the following information:\n\n- **First line:** `Hello World!`\n- **Method:** The HTTP method used (GET, POST, PUT, DELETE, etc.)\n- **Path:** The path requested\n- **Query:** Query parameters (if any)\n- **Timestamp:** Request timestamp in UTC\n- **Client IP:** Client's IP address (supports X-Forwarded-For header)\n- **User-Agent:** Client's User-Agent header\n- **Hostname:** Server's hostname\n- **Identifier:** Optional identifier (from `IDENTIFIER` environment variable)\n- **Request Count:** Total number of requests served\n\n## 🏥 Health Check Endpoint\n\nA dedicated `/health` endpoint is available for monitoring and health checks:\n\n```bash\ncurl http://localhost/health\n```\n\nResponse: `OK`\n\nThis endpoint is ideal for container orchestration systems like Kubernetes or Docker Swarm.\n\nThe app listens on **port 80** by default (configurable via `PORT` environment variable).\n\n## 🐳 Docker Image\n\nThis project is available as a Docker image:\n\n```bash\ndocker pull riccardotornesello/hello-world-http-server\n```\n\n## 🚀 Running the Server\n\nRun the container exposing port `80`:\n\n```bash\ndocker run -p 80:80 riccardotornesello/hello-world-http-server\n```\n\nRun on a custom port (e.g., port 3000):\n\n```bash\ndocker run -p 3000:3000 -e PORT=3000 riccardotornesello/hello-world-http-server\n```\n\nIf you want to set a custom identifier:\n\n```bash\ndocker run -p 80:80 -e IDENTIFIER=\"MyServer123\" riccardotornesello/hello-world-http-server\n```\n\n## 🌐 Example Response\n\nRequest:\n\n```bash\ncurl http://localhost/test?query=example\n```\n\nResponse:\n\n```\nHello World!\nMethod: GET\nPath: /test\nQuery: query=example\nTimestamp: 2025-10-19 23:00:00 UTC\nClient IP: 172.17.0.1\nUser-Agent: curl/8.5.0\nHostname: abc123def456\nIdentifier: MyServer123\nRequest Count: 42\n```\n\n_(If `IDENTIFIER` is not set, that line is omitted.)_\n\n## ⚙️ Environment Variables\n\n| Variable   | Description                                              | Default |\n| ---------- | -------------------------------------------------------- | ------- |\n| PORT       | Port number for the HTTP server                          | 80      |\n| IDENTIFIER | Optional identifier to include in output                 | (none)  |\n| DELAY      | Optional delay in seconds before responding (for testing)| 0       |\n\n### Using DELAY for Testing\n\nThe `DELAY` environment variable is useful for simulating slow responses and testing timeout handling:\n\n```bash\ndocker run -p 80:80 -e DELAY=2 riccardotornesello/hello-world-http-server\n```\n\nThis will make the server wait 2 seconds before responding to each request.\n\nYou can also override the delay on a per-request basis using the `delay` query parameter:\n\n```bash\ncurl \"http://localhost/?delay=3\"\ncurl \"http://localhost/api/test?delay=1\u0026id=123\"\n```\n\nThe query parameter takes precedence over the environment variable.\n\n## 🔧 Supported HTTP Methods\n\nThe server accepts all standard HTTP methods:\n- GET\n- POST\n- PUT\n- DELETE\n- PATCH\n- HEAD\n- OPTIONS\n\nExample:\n```bash\ncurl -X POST http://localhost/api/data\ncurl -X PUT http://localhost/api/update\ncurl -X DELETE http://localhost/api/resource\n```\n\n## 🧪 Testing\n\nRun the test suite:\n\n```bash\npip install -r requirements-dev.txt\npytest test_server.py -v\n```\n\n## 📜 License\n\nThis project is licensed under the MIT License.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Friccardotornesello%2Fhello-world-http-server","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Friccardotornesello%2Fhello-world-http-server","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Friccardotornesello%2Fhello-world-http-server/lists"}