{"id":15858891,"url":"https://github.com/liamg/waitforhttp","last_synced_at":"2025-08-12T19:32:51.988Z","repository":{"id":56664258,"uuid":"206603629","full_name":"liamg/waitforhttp","owner":"liamg","description":"Tiny package to wait for an HTTP server to be up","archived":false,"fork":false,"pushed_at":"2020-10-26T13:45:47.000Z","size":20,"stargazers_count":4,"open_issues_count":0,"forks_count":1,"subscribers_count":3,"default_branch":"master","last_synced_at":"2024-10-27T03:46:30.016Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"Go","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/liamg.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2019-09-05T15:58:40.000Z","updated_at":"2023-09-08T17:57:43.000Z","dependencies_parsed_at":"2022-08-15T22:50:49.175Z","dependency_job_id":null,"html_url":"https://github.com/liamg/waitforhttp","commit_stats":null,"previous_names":[],"tags_count":1,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/liamg%2Fwaitforhttp","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/liamg%2Fwaitforhttp/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/liamg%2Fwaitforhttp/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/liamg%2Fwaitforhttp/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/liamg","download_url":"https://codeload.github.com/liamg/waitforhttp/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":229705480,"owners_count":18110792,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","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":[],"created_at":"2024-10-05T21:01:36.677Z","updated_at":"2024-12-14T12:40:46.411Z","avatar_url":"https://github.com/liamg.png","language":"Go","funding_links":[],"categories":[],"sub_categories":[],"readme":"# waitforhttp\n[![Travis](https://img.shields.io/travis/liamg/waitforhttp.svg?style=flat-square)](https://travis-ci.org/liamg/waitforhttp)\n\nWaits for an HTTP server to be serving before returning.\n\nExample:\n```go\npackage main\n\nimport (\n    \"fmt\"\n    \"net/http\"\n    \"time\"\n\n    \"github.com/liamg/waitforhttp\"\n)\n\nfunc main() {\n    \n    server := \u0026http.Server{\n        Addr: \":8080\",\n    }\n    \n    go func() {\n        if err := waitforhttp.Wait(server, time.Second*10); err != nil {\n            panic(err)\n        }   \n        fmt.Println(\"Hooray! Server is listening now!\")\n    }()\n    \n    if err := server.ListenAndServe(); err != nil \u0026\u0026 err != http.ErrServerClosed {\n        panic(fmt.Sprintf(\"Failed to start server: %s\", err))\n    }\n}\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fliamg%2Fwaitforhttp","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fliamg%2Fwaitforhttp","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fliamg%2Fwaitforhttp/lists"}