14 lines
283 B
Go
14 lines
283 B
Go
package main
|
|
|
|
import ("net/http"; "io")
|
|
|
|
func hello(res http.ResponseWriter, req *http.Request) {
|
|
res.Header().Set("Content-Type", "text/plain")
|
|
io.WriteString(res, "Hello From HTTP\n")
|
|
}
|
|
|
|
func main() {
|
|
http.HandleFunc("/", hello)
|
|
http.ListenAndServe(":5000", nil)
|
|
}
|