hello.go 352 B

12345678910111213141516
  1. package main
  2. import (
  3. "fmt"
  4. "net/http"
  5. )
  6. func handler(w http.ResponseWriter, r *http.Request) {
  7. fmt.Fprintln(w, "Hello world! This is a test minimal Go application that uses 'FROM scratch', and thus only takes 6MB. ")
  8. }
  9. func main() {
  10. fmt.Println("Listening on port 8080.....")
  11. http.HandleFunc("/", handler)
  12. http.ListenAndServe(":8080", nil)
  13. }