renumber again
This commit is contained in:
15
094-http-server/http-server.go
Normal file
15
094-http-server/http-server.go
Normal file
@@ -0,0 +1,15 @@
|
||||
// ## HTTP Server
|
||||
|
||||
package main
|
||||
|
||||
import "net/http"
|
||||
|
||||
func hello(res http.ResponseWriter, req *http.Request) {
|
||||
res.Header().Set("Content-Type", "text/plain")
|
||||
res.Write([]byte("Hello From HTTP\n"))
|
||||
}
|
||||
|
||||
func main() {
|
||||
http.HandleFunc("/", hello)
|
||||
http.ListenAndServe(":5000", nil)
|
||||
}
|
||||
Reference in New Issue
Block a user