diff --git a/httpServer.go b/httpServer.go deleted file mode 100644 index b75f2d0..0000000 --- a/httpServer.go +++ /dev/null @@ -1,15 +0,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!") -} diff --git a/lib/httpServer.go b/lib/httpServer.go new file mode 100644 index 0000000..b75f2d0 --- /dev/null +++ b/lib/httpServer.go @@ -0,0 +1,15 @@ +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!") +}