move http-server sample
1 parent ae659b6 commit 14d6d1244ae99f6071f01589de44986b6b7e7171
yhornisse authored on 27 Sep 2021
Showing 2 changed files
View
16
httpServer.go 100644 → 0
package main
 
import (
"fmt"
"net/http"
)
 
func main() {
http.HandleFunc("/", handler)
http.ListenAndServe("localhost:8080", nil)
}
 
func handler(w http.ResponseWriter, r *http.Request) {
fmt.Fprintln(w, "Hello, World!")
}
View
16
lib/httpServer.go 0 → 100644
package main
 
import (
"fmt"
"net/http"
)
 
func main() {
http.HandleFunc("/", handler)
http.ListenAndServe("localhost:8080", nil)
}
 
func handler(w http.ResponseWriter, r *http.Request) {
fmt.Fprintln(w, "Hello, World!")
}