Create easily a http Handler for static file.
go get github.com/HuguesGuilleus/static.v3
package main
import (
"github.com/HuguesGuilleus/static.v3"
"log"
"net/http"
)
func main() {
// To pass in Dev mode.
// static.Dev = true
http.HandleFunc("/", static.Html().File("front/index.html"))
http.HandleFunc("/style.css", static.Css().File("front/style.css"))
http.HandleFunc("/app.js", static.Js().File("front/app.js"))
http.HandleFunc("/favicon.png", static.Png().File("front/favicon.png"))
log.Fatal(http.ListenAndServe(":8000", nil))
}