Created
May 10, 2018 19:43
-
-
Save maxk42/2010467c701bdeb26da047a02166727b to your computer and use it in GitHub Desktop.
Tiny "Hello World" server in go with no dependencies except net/http
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
package main | |
import "net/http" | |
func main() { | |
http.HandleFunc("/", func(w http.ResponseWriter, r * http.Request) { | |
w.Write([]byte("Hello, World!\n")) | |
}) | |
http.ListenAndServe(":80", nil) | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment