You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
web.go is the simplest way to write web applications in the Go programming language. It's ideal for writing simple, performant backend web services.
Overview
web.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:
Routing to url handlers based on regular expressions
Secure cookies
Support for fastcgi and scgi
Web applications are compiled to native code. This means very fast execution and page render speed
Efficiently serving static files
Installation
Make sure you have the a working Go environment. See the install instructions. web.go targets the Go release branch.
To install web.go, simply run:
go get github.com/hoisie/web
To compile it from source:
git clone git://github.com/hoisie/web.git
cd web && go build
Route 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:
If 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.
About
web.go was written by Michael Hoisie
About
The easiest way to create web applications with Go