Skip to content

Instantly share code, notes, and snippets.

@webdevwilson
Created September 19, 2019 21:49
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save webdevwilson/39c74336d614117e14b7dd5f79b511ef to your computer and use it in GitHub Desktop.
Save webdevwilson/39c74336d614117e14b7dd5f79b511ef to your computer and use it in GitHub Desktop.
func main() {
var port string
var ok bool
if port, ok = os.LookupEnv("PORT"); !ok {
port = "8080"
}
http.Handle("/", boundary.NewRequestHandler(""))
log.Fatal(http.ListenAndServe(fmt.Sprintf(":%s", port), nil))
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment