{"id":16940114,"url":"https://github.com/joho/prohttphandler","last_synced_at":"2025-03-21T06:11:18.072Z","repository":{"id":57544540,"uuid":"12911161","full_name":"joho/prohttphandler","owner":"joho","description":"A (not very) pro http handler for go (does simple asset serving and exact match paths -\u003e handler funcs)","archived":false,"fork":false,"pushed_at":"2017-12-22T23:37:23.000Z","size":4,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":3,"default_branch":"master","last_synced_at":"2025-01-26T02:52:16.490Z","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":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/joho.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":"2013-09-18T01:28:35.000Z","updated_at":"2017-12-22T23:37:24.000Z","dependencies_parsed_at":"2022-08-27T05:13:21.436Z","dependency_job_id":null,"html_url":"https://github.com/joho/prohttphandler","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/joho%2Fprohttphandler","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/joho%2Fprohttphandler/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/joho%2Fprohttphandler/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/joho%2Fprohttphandler/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/joho","download_url":"https://codeload.github.com/joho/prohttphandler/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":244745760,"owners_count":20503050,"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-13T21:06:20.045Z","updated_at":"2025-03-21T06:11:18.051Z","avatar_url":"https://github.com/joho.png","language":"Go","funding_links":[],"categories":[],"sub_categories":[],"readme":"# ProHttpHandler\n\nA teeny tiny http handler for Go that I wanted to reuse across a couple of projects.\n\nIt gives you two things: static asset handling (in a path of your choice) and exact matching of paths to http handler funcs\n\n## Example \n\nAn example that serves all files in \"public\" at / and serves up a super boring homepage on port 8080.\n\n```go\npackage main\n\nimport (\n  \"fmt\"\n  \"github.com/joho/prohttphandler\"\n  \"log\"\n  \"net/http\"\n)\n\nfunc main() {\n  handler := prohttphandler.New(\"public\")\n\n  handler.ExactMatchFunc(\"/\", func(w http.ResponseWriter, r *http.Request) {\n    fmt.Fprintf(w, \"This is the homepage at /\")\n  })\n\n  log.Fatal(http.ListenAndServe(\":8080\", handler))\n}\n```\n\nThere are some very poor [docs here](http://godoc.org/github.com/joho/prohttphandler)\n\n---\nCopyright 2013 [John Barton](https://johnbarton.co/) (but under MIT Licence)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjoho%2Fprohttphandler","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fjoho%2Fprohttphandler","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjoho%2Fprohttphandler/lists"}