package main
import "fmt"
import "net/http"
func handler(w http.ResponseWriter, r *http.Request){
fmt.Println("Inside handler")
fmt.Fprintf(w, "Hello world from my go program\n")
}
func main(){
http.HandleFunc("/",handler) //redirect all urls to handler function
http.ListenAndServe("localhost:9999",nil)
}
Brak komentarzy:
Prześlij komentarz