Volatile Static is a handler for the Core.
It serves files from the static
directory on the /static
URL path.
$ go get github.com/volatile/static
package main
import (
"github.com/volatile/core"
"github.com/volatile/static"
)
func main() {
static.Use(static.DefaultMaxAge)
core.Run()
}
The Use
method receives a single parameter: the max-age
(in seconds) for all resources.
This setting is only used in a production environment.