Implement root handler

This commit is contained in:
Ben Sarmiento
2023-11-30 23:08:16 +01:00
parent 0ad879066e
commit 9f81b2b1d0
9 changed files with 105 additions and 127 deletions

View File

@@ -59,7 +59,7 @@ func MainApp(configPath string) {
handler := httprouter.New()
handler.RedirectTrailingSlash = false
handler.RedirectFixedPath = true
router.ApplyRouteTable(handler, getfile, torrentMgr, config, log.Named("router"))
router.ApplyRouteTable(handler, getfile, torrentMgr, config, rd, log.Named("router"))
addr := fmt.Sprintf("%s:%s", config.GetHost(), config.GetPort())
zurglog.Infof("Starting server on %s", addr)