UNSTABLE VERSION 2.0: The current stable version is here forgery
Forgery is a minimal and flexible golang web application framework, providing a robust set of features for building single and multi-page, web applications.
- Robust routing
- HTTP helpers (redirection, caching, etc)
- View system supporting 1 template engine (hopefully more will come)
- Content negotiation
- Focus on high performance
- Environment based configuration
- High test coverage
go get github.com/goforgery/forgery2
Starts a web server.
package main
import(
"github.com/goforgery/forgery2"
)
func main() {
app := f.CreateApp()
app.Get("/", func(req *f.Request, res *f.Response, next func()) {
res.Send("Hello world.")
})
app.Listen(3000)
}
go test ./...
go test -coverprofile=coverage.out; go tool cover -html=coverage.out -o=coverage.html
open coverage.html
go test -bench=. -run=BENCH_ONLY
This project started out as a clone of the superb Node.js library Express.