You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

19 lines
334B

  1. package main
  2. import (
  3. "fmt"
  4. "net/http"
  5. "os"
  6. )
  7. func handler(w http.ResponseWriter, r *http.Request) {
  8. w.Header().Add("Content-Type", "text/html; charset=utf-8")
  9. fmt.Fprintf(w, "%s", os.Getenv("TEXT"))
  10. }
  11. func main() {
  12. fmt.Println("Listening on port 8080...")
  13. http.HandleFunc("/", handler)
  14. http.ListenAndServe(":8080", nil)
  15. }