summaryrefslogtreecommitdiff
AgeCommit message (Collapse)Author
30 hoursHook up frontend in Go web serverxengineering
This makes the Hugo-built static website part of site hosted by Go which also contains the dynamic API under /api.
30 hoursfrontend: layouts: Add baseof.html and home.htmlxengineering
These two files are the starting point for the front end.
30 hoursfrontend: Add .gitignorexengineering
Hugo produces files which should not be committed.
30 hoursfrontend: Reduce to explicitly wanted filesxengineering
Hugo by default generates output files which are not yet needed.
31 hoursfrontend: Add hugo.tomlxengineering
This is the starting point of a Hugo[1] based web frontend. [1]: https://gohugo.io/
31 hoursMove to /api/versionxengineering
The old /version endpoint was moved. It should be part of the API and it is intended that everything not part of /api/* is a static web site which is also served by the Go server.
31 hoursRemove / and hello() handlerxengineering
This was just for demonstration purposes.
31 hoursSplit run() arguments into multiple linesxengineering
One line per argument makes the code more readable and also diffs in case arguments are changed.
31 hoursRun go fmtxengineering
31 hoursMake run fully configurablexengineering
This makes the run() function compared to main() useful at all since all parameters can be changed to test e.g. with unit tests.
31 hoursAdd handlers.goxengineering
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.
31 hoursRename srv to serverxengineering
This improves readability.
31 hoursRegister routes with init()xengineering
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.
31 hoursAdd /versionxengineering
31 hoursLog HTTP URLxengineering
3 daysFix stop messagexengineering
3 daysAdd HTTP-based hello worldxengineering
This demonstrates the HTTP server is working.
3 daysAdd github.com/gorilla/mux v1.8.1xengineering
This should be used for the HTTP routing.
3 daysLog start and stop of serverxengineering
3 daysIntroduce run() functionxengineering
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.
3 daysAdd Go hello world programxengineering
This is a starting point to build the server.
3 daysAdd go.mod filexengineering
This makes the repository a Go module which is required to fetch dependencies.
3 daysAdd README.mdxengineering
This explains the purpose of the project.
3 daysAdd Mozilla Public License 2.0xengineering