Browse Source

First commit

litpooh 3 years ago
commit
ecce762318
1 changed files with 15 additions and 0 deletions
  1. 15 0
      server.go

+ 15 - 0
server.go

@@ -0,0 +1,15 @@
+package main
+
+import (
+	"fmt"
+	"net/http"
+)
+
+func index_handler(w http.ResponseWriter, r *http.Request) {
+	fmt.Fprintf(w, "Hello World!")
+}
+
+func main() {
+	http.HandleFunc("/", index_handler)
+	http.ListenAndServe(":8000", nil)
+}