about summary refs log tree commit diff
path: root/src/main.go
diff options
context:
space:
mode:
authorEmile <hanemile@protonmail.com>2019-10-20 16:53:28 +0200
committerEmile <hanemile@protonmail.com>2019-10-20 16:53:28 +0200
commitc856c7e66e3ad29ea0491f1f4951b31deb8279ea (patch)
treee32daefbeec30e667f261eca2c5a3409e783453d /src/main.go
parent22e3029cbf5fa7fd64bfaea2e4dcd011c40a4236 (diff)
functional
Diffstat (limited to 'src/main.go')
-rw-r--r--src/main.go18
1 files changed, 18 insertions, 0 deletions
diff --git a/src/main.go b/src/main.go
new file mode 100644
index 0000000..57007e8
--- /dev/null
+++ b/src/main.go
@@ -0,0 +1,18 @@
+package main
+
+import (
+	"flag"
+	"log"
+)
+
+func main() {
+	// Set up flags
+	registerHTTPFlags()
+	flag.Parse()
+
+	// Set up the http server
+	log.Printf("Running the HTTP server on port %d", *port)
+	httpServer := setupHTTPServer()
+
+	log.Fatalln(httpServer.ListenAndServe())
+}