Skip to content

Instantly share code, notes, and snippets.

@serafdev
Created May 18, 2020 03:18
Show Gist options
  • Save serafdev/3f1345408f72189e52ca37f4ca425828 to your computer and use it in GitHub Desktop.
Save serafdev/3f1345408f72189e52ca37f4ca425828 to your computer and use it in GitHub Desktop.
Http Go Service
package main
import (
"fmt"
"net/http"
)
func main() {
http.HandleFunc("/", func(w http.ResponseWriter, r *http.Request) {
fmt.Fprintf(w, "Livemounted %s\n", "Version One")
})
fmt.Println("Serving Go app on port 8081")
http.ListenAndServe(":8081", nil)
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment