diff --git a/main.go b/main.go new file mode 100644 index 0000000..be62989 --- /dev/null +++ b/main.go @@ -0,0 +1,18 @@ +package main + +import ( + "fmt" + "log" + "net/http" +) + +func main() { + + http.HandleFunc("/", HelloHandler) + fmt.Println("Server started at port 8080") + log.Fatal(http.ListenAndServe(":8080", nil)) +} + +func HelloHandler(w http.ResponseWriter, r *http.Request) { + fmt.Fprintf(w, "Hello, there\n") +}