goji-staticbin is a middleware for Goji that serves static files from a go-bindata generated asset file.
To install the library, use the following command:
go get github.com/hypebeast/gojistaticbin
package main
import (
"github.com/hypebeast/gojistaticbin"
"github.com/zenazn/goji"
)
func main() {
goji.Use(gojistaticbin.Staticbin("static", Asset, gojistaticbin.Options{
SkipLogging: false,
IndexFile: "index.html",
}))
goji.Serve()
}
See the examples
folder for an example application that uses goji-staticbin.