Skip to content

Instantly share code, notes, and snippets.

@jheise
Created May 9, 2022 03:26
Show Gist options
  • Save jheise/82ca8ebc122ae723de036bde5ca25aaf to your computer and use it in GitHub Desktop.
Save jheise/82ca8ebc122ae723de036bde5ca25aaf to your computer and use it in GitHub Desktop.
exceeding simple golang web server
import (
"net/http"
"fmt"
)
func handleIndex(w http.ResponseWriter, req *http.Request) {
fmt.Fprintf(w, "hello\n")
}
func main() {
http.HandleFunc("/", handleIndex)
http.ListenAndServe(":8080", nil)
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment