{"id":19142698,"url":"https://github.com/jgaa/rest-diag-svc","last_synced_at":"2026-04-21T05:33:59.532Z","repository":{"id":68076553,"uuid":"141477648","full_name":"jgaa/rest-diag-svc","owner":"jgaa","description":"Minimalistic REST API server that just returns diagnostics data","archived":false,"fork":false,"pushed_at":"2018-07-19T06:15:43.000Z","size":10,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":3,"default_branch":"master","last_synced_at":"2025-02-22T19:25:28.669Z","etag":null,"topics":["diagnostics","docker-image","nodejs"],"latest_commit_sha":null,"homepage":"","language":"JavaScript","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/jgaa.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}},"created_at":"2018-07-18T18:58:10.000Z","updated_at":"2018-07-19T06:15:44.000Z","dependencies_parsed_at":null,"dependency_job_id":"944f7aae-df34-466c-9d12-02e949fd7306","html_url":"https://github.com/jgaa/rest-diag-svc","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/jgaa/rest-diag-svc","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jgaa%2Frest-diag-svc","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jgaa%2Frest-diag-svc/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jgaa%2Frest-diag-svc/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jgaa%2Frest-diag-svc/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/jgaa","download_url":"https://codeload.github.com/jgaa/rest-diag-svc/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jgaa%2Frest-diag-svc/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":32079010,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-04-21T02:38:07.213Z","status":"ssl_error","status_checked_at":"2026-04-21T02:38:06.559Z","response_time":128,"last_error":"SSL_read: 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":["diagnostics","docker-image","nodejs"],"created_at":"2024-11-09T07:28:11.091Z","updated_at":"2026-04-21T05:33:59.518Z","avatar_url":"https://github.com/jgaa.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# rest-diag-svc\nMinimalistic REST API server that just returns diagnostics data\n\nExample:\n\n```sh\n$ docker build -t demo .\nSending build context to Docker daemon  57.86kB\n...\nSuccessfully built 52620cfc6f08\nSuccessfully tagged demo:latest\n\n$ docker run -e SERVICE_NAME=demo-server -p 8080:8080 --rm -d --name demo demo\nc29c334ed81a441236676418b7d917077a8c6a84988a432adbe21635a8d1fe0e\n\n$ curl \"http://127.0.0.1:8080/test/me\u0026id=today\"\n{\n    \"service\": \"demo-server\",\n    \"host\": \"c29c334ed81a\",\n    \"request\": \"/test/me\u0026id=today\",\n    \"method\": \"GET\",\n    \"headers\": {\n        \"host\": \"127.0.0.1:8080\",\n        \"user-agent\": \"curl/7.52.1\",\n        \"accept\": \"*/*\"\n    },\n    \"from\": \"::ffff:172.17.0.1\"\n}\n```\n\nIn the reply, we got the name we passed as SERVICE_NAME on the first line. This is practical in order to verify that the service you hit (for example trough a load-balancer to a Docker Swarm or Kubernertes cluster), runs the container you expect it to run.\n\nWe also get the request url (nice when you debug nginx rewrite rules, or have problems with a REST client) and some other useful information.\n\nI made this server to test a Proof Of Concept for [this](https://github.com/jgaa/nginx-swarm-proxy) project.\n\nBut it may be useful for other purposes as well.\n\n# Prebuilt image\n\nYou can pull an image built from this projects Dockerfile from [Docker Hub](https://hub.docker.com/r/jgaafromnorth/rest-diag-svc/)\n\n```sh\n$ docker pull jgaafromnorth/rest-diag-svc\n\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjgaa%2Frest-diag-svc","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fjgaa%2Frest-diag-svc","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjgaa%2Frest-diag-svc/lists"}