Created
May 9, 2022 03:26
-
-
Save jheise/82ca8ebc122ae723de036bde5ca25aaf to your computer and use it in GitHub Desktop.
exceeding simple golang web server
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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