Golang static files server
For example if you want to serve your Jekyll powered blog:
package main
import "net/http"
func main() {
http.Handle("/", http.FileServer(http.Dir("_site")))
err := http.ListenAndServe(":8000", nil)
if err != nil {
panic(err)
}
}
Written by Jérôme Mahuet
Related protips
Have a fresh tip? Share with Coderwall community!
Post
Post a tip
Best
#Static
Authors
Sponsored by #native_company# — Learn More
#native_title#
#native_desc#