aboutsummaryrefslogtreecommitdiff
path: root/main.go
diff options
context:
space:
mode:
authorGabriel A. Giovanini <mail@gabrielgio.me>2024-05-26 22:14:56 +0200
committerGabriel A. Giovanini <mail@gabrielgio.me>2024-05-26 22:14:56 +0200
commit3d8637838e9ccfcb56899842945e760f337428b0 (patch)
tree2a2780e84b7ed00a0f56234f663fba92d44dfb53 /main.go
parentadc207d2e6c39fa31283d83021e76300c0099c37 (diff)
downloadcerrado-3d8637838e9ccfcb56899842945e760f337428b0.tar.gz
cerrado-3d8637838e9ccfcb56899842945e760f337428b0.tar.bz2
cerrado-3d8637838e9ccfcb56899842945e760f337428b0.zip
feat: Add about page
Diffstat (limited to 'main.go')
-rw-r--r--main.go2
1 files changed, 2 insertions, 0 deletions
diff --git a/main.go b/main.go
index 644b96c..76da07b 100644
--- a/main.go
+++ b/main.go
@@ -58,9 +58,11 @@ func run(ctx context.Context) error {
//handlers
gitHandler := handler.NewGitHandler(gitService)
+ aboutHandler := handler.NewAboutHandler(config.RootReadme)
mux.Handle("/static/", staticHandler)
mux.HandleFunc("/config", handler.ConfigFile(*configPath))
+ mux.HandleFunc("/about", aboutHandler.About)
mux.HandleFunc("/", gitHandler.List)
serverTask := worker.NewServerTask(&http.Server{Handler: mux, Addr: "0.0.0.0:8080"})