{"id":13469956,"url":"https://github.com/hoisie/web","last_synced_at":"2025-05-14T09:11:24.514Z","repository":{"id":37412584,"uuid":"408601","full_name":"hoisie/web","owner":"hoisie","description":"The easiest way to create web applications with Go","archived":false,"fork":false,"pushed_at":"2024-06-29T16:29:40.000Z","size":3188,"stargazers_count":3675,"open_issues_count":48,"forks_count":706,"subscribers_count":213,"default_branch":"master","last_synced_at":"2025-04-09T02:17:56.645Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"","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/hoisie.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":"2009-12-08T20:46:02.000Z","updated_at":"2025-04-06T15:39:58.000Z","dependencies_parsed_at":"2024-06-18T12:36:11.204Z","dependency_job_id":"67f9555d-e7d8-4db7-bfc5-849b01d98080","html_url":"https://github.com/hoisie/web","commit_stats":{"total_commits":278,"total_committers":38,"mean_commits":7.315789473684211,"dds":0.5179856115107914,"last_synced_commit":"a498c022b2c0babab2bf9c0400754190b24c8c39"},"previous_names":[],"tags_count":1,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/hoisie%2Fweb","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/hoisie%2Fweb/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/hoisie%2Fweb/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/hoisie%2Fweb/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/hoisie","download_url":"https://codeload.github.com/hoisie/web/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":254110374,"owners_count":22016391,"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-07-31T16:00:19.671Z","updated_at":"2025-05-14T09:11:24.487Z","avatar_url":"https://github.com/hoisie.png","language":"Go","funding_links":[],"categories":["Go","Web Frameworks"],"sub_categories":["Advanced Console UIs"],"readme":"[![Build Status](https://travis-ci.org/hoisie/web.svg?branch=master)](https://travis-ci.org/hoisie/web)\n\n# web.go\n\nweb.go is the simplest way to write web applications in the Go programming language. It's ideal for writing simple, performant backend web services. \n\n## Overview\n\nweb.go should be familiar to people who've developed websites with higher-level web frameworks like sinatra or web.py. It is designed to be a lightweight web framework that doesn't impose any scaffolding on the user. Some features include:\n\n* Routing to url handlers based on regular expressions\n* Secure cookies\n* Support for fastcgi and scgi\n* Web applications are compiled to native code. This means very fast execution and page render speed\n* Efficiently serving static files\n\n## Installation\n\nMake sure you have the a working Go environment. See the [install instructions](http://golang.org/doc/install.html). web.go targets the Go `release` branch.\n\nTo install web.go, simply run:\n\n    go get github.com/hoisie/web\n\nTo compile it from source:\n\n    git clone git://github.com/hoisie/web.git\n    cd web \u0026\u0026 go build\n\n## Example\n```go\npackage main\n    \nimport (\n    \"github.com/hoisie/web\"\n)\n    \nfunc hello(val string) string { return \"hello \" + val } \n    \nfunc main() {\n    web.Get(\"/(.*)\", hello)\n    web.Run(\"0.0.0.0:9999\")\n}\n```\n\nTo run the application, put the code in a file called hello.go and run:\n\n    go run hello.go\n    \nYou can point your browser to http://localhost:9999/world . \n\n### Getting parameters\n\nRoute handlers may contain a pointer to web.Context as their first parameter. This variable serves many purposes -- it contains information about the request, and it provides methods to control the http connection. For instance, to iterate over the web parameters, either from the URL of a GET request, or the form data of a POST request, you can access `ctx.Params`, which is a `map[string]string`:\n\n```go\npackage main\n\nimport (\n    \"github.com/hoisie/web\"\n)\n    \nfunc hello(ctx *web.Context, val string) { \n    for k,v := range ctx.Params {\n\t\tprintln(k, v)\n\t}\n}   \n    \nfunc main() {\n    web.Get(\"/(.*)\", hello)\n    web.Run(\"0.0.0.0:9999\")\n}\n```\n\nIn this example, if you visit `http://localhost:9999/?a=1\u0026b=2`, you'll see the following printed out in the terminal:\n\n    a 1\n    b 2\n\n## Documentation\n\nAPI docs are hosted at https://hoisie.github.io/web/\n\nIf you use web.go, I'd greatly appreciate a quick message about what you're building with it. This will help me get a sense of usage patterns, and helps me focus development efforts on features that people will actually use. \n\n## About\n\nweb.go was written by Michael Hoisie\n\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fhoisie%2Fweb","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fhoisie%2Fweb","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fhoisie%2Fweb/lists"}