Skip to content

Instantly share code, notes, and snippets.

@doorbash
Created September 13, 2019 14:12
Show Gist options
  • Save doorbash/c5b4bed211eb34a12f30ea6212b33cce to your computer and use it in GitHub Desktop.
Save doorbash/c5b4bed211eb34a12f30ea6212b33cce to your computer and use it in GitHub Desktop.
package main
import (
"fmt"
"log"
"net/http"
)
func main() {
http.HandleFunc("/", func(rw http.ResponseWriter, r *http.Request) {
fmt.Fprintf(rw, "Hello World!")
})
err := http.ListenAndServe(":8080", nil)
if err != nil {
log.Fatal(err)
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment