about summary refs log tree commit diff
diff options
context:
space:
mode:
-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))
 }