Skip to content

Instantly share code, notes, and snippets.

@Bebbolus
Created November 30, 2018 16:41
Show Gist options
  • Save Bebbolus/109ba78847b7ccce1d227003a82b16ca to your computer and use it in GitHub Desktop.
Save Bebbolus/109ba78847b7ccce1d227003a82b16ca to your computer and use it in GitHub Desktop.
package main
import (
"fmt"
"log"
"net/http"
)
func controller(w http.ResponseWriter, r *http.Request) {
fmt.Fprintf(w, "Hi there!")
}
func main() {
http.HandleFunc("/", controller)
log.Fatal(http.ListenAndServe(":8080", nil))
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment