github.com/rkusa/web

Minimal web toolkit build upon the Go 1.7 immutable context


License
MIT
Install
go get github.com/rkusa/web

Documentation

web

Minimal web toolkit build upon the Go 1.7 immutable context.

Build Status GoDoc

Example

app := web.New()
app.Use(assert.Middleware())
app.Use(web.Mount("/assets", serve.Dir("public")))
app.Use(logger.Middleware())
app.Use(timeout.Timeout("15s"))
app.Use(render.Middleware(render.Options{
    Directory: "views",
}))
app.Use(sessions.Middleware(
    cookieName,
    sessions.NewCookieStore([]byte("secret")),
))
app.Use(routes.Public())
if err := app.Run("0.0.0.0:3000"); err != nil {
    log.Fatal(err)
}

Works well with

License

MIT