Commit 05d0bc8d authored by Aksel Baardsen's avatar Aksel Baardsen
Browse files

commented main.go

parent 94b18f48
......@@ -15,6 +15,7 @@ func main() {
port = "5000"
}
// creating a subrouter with a fixed path
c := r.PathPrefix("/conservation/v1").Methods("GET").Subrouter()
// two handlerpaths makes sure that the caller does not HAVE to specify limit
......@@ -31,6 +32,7 @@ func main() {
c.Path("/diag/").
HandlerFunc(handler.Dhandler)
// makes sure that the router r handles all http-requests
http.Handle("/", r)
log.Fatal(http.ListenAndServe(":"+port, nil))
}
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment