Skip to content

Instantly share code, notes, and snippets.

@jorgeteixe
Created December 13, 2022 15:37
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save jorgeteixe/2c81d608feafed154a949921b7e889be to your computer and use it in GitHub Desktop.
Save jorgeteixe/2c81d608feafed154a949921b7e889be to your computer and use it in GitHub Desktop.
Simple go web app.
package main
import (
"fmt"
"log"
"net/http"
)
func main() {
http.HandleFunc("/", func(w http.ResponseWriter, r *http.Request){
fmt.Fprintf(w, "Hello, world!")
})
log.Fatal(http.ListenAndServe(":8081", nil))
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment