main.go 227 B

123456789101112131415
  1. package main
  2. import (
  3. "fmt"
  4. "net/http"
  5. )
  6. func Index(w http.ResponseWriter, r *http.Request) {
  7. fmt.Fprintf(w, "Hello world")
  8. }
  9. func main() {
  10. http.HandleFunc("/", Index)
  11. http.ListenAndServe(":9000", nil)
  12. }