| Age | Commit message (Collapse) | Author |
|
|
|
Many logging systems provide timestamps on their own. To avoid
duplication it is disabled by default.
|
|
One line per argument makes the code more readable and also diffs in
case arguments are changed.
|
|
|
|
This makes the run() function compared to main() useful at all since all
parameters can be changed to test e.g. with unit tests.
|
|
This keeps the HTTP handlers in a separate file which registers the
routes in an init() function.
The main execution flow is still maintained in a now minimal main.go.
|
|
This improves readability.
|
|
This makes the used *mux.Router from github.com/gorilla/mux a global
variable.
A new router is created in the line where the global variable is
created. Handlers can be added across the code base in init() functions.
|
|
|
|
|
|
|
|
This demonstrates the HTTP server is working.
|
|
|
|
This function should be called by main but can also be called by a unit
test to run a server which might have different arguments which will
likely be added.
|
|
This is a starting point to build the server.
|