Skip to content

Instantly share code, notes, and snippets.

@hiyosi
Created October 16, 2017 00:10
Show Gist options
  • Save hiyosi/4cb7a0334c84a133061861d08d721ccf to your computer and use it in GitHub Desktop.
Save hiyosi/4cb7a0334c84a133061861d08d721ccf to your computer and use it in GitHub Desktop.
func main() {
r := mux.NewRouter()
r.HandleFunc("/foo", someHandler)
var err error
listener, err := net.Listen("unix", "/var/run/fcgi.sock")
if err != nil {
log.Fatal(err)
}
defer listener.Close()
err = fcgi.Serve(listener, r)
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment