about summary refs log tree commit diff
diff options
context:
space:
mode:
authorEmile <hanemile@protonmail.com>2019-09-23 12:24:36 +0200
committerEmile <hanemile@protonmail.com>2019-09-23 12:24:36 +0200
commit1b3545a9f69f61a503f1c996c199c38b11a78e7e (patch)
treebe613c608e0c3b20f0b8256dcb88f74989d31c63
parent67f80f6b6bb8fe8e1b997cb839859901d61b673a (diff)
added some comments
-rw-r--r--server.go5
1 files changed, 5 insertions, 0 deletions
diff --git a/server.go b/server.go
index 69d528b..586d962 100644
--- a/server.go
+++ b/server.go
@@ -16,13 +16,18 @@ var (
 )
 
 func main() {
+	// Parse the command line flags
 	initFlags()
+
+	// Define a new gorilla/mux router and define some endpoints
 	r := mux.NewRouter()
 
 	r.HandleFunc("/", indexHandler)
 	r.HandleFunc("/dumpall", dumpallHandler)
 	r.HandleFunc("/{station}/{name}", getHandler)
 
+	// Start the http server using the port provided using command line arguments
+	// The Default port is 8080
 	log.Fatal(http.ListenAndServe(fmt.Sprintf(":%d", port), r))
 }