Update
CI / test (push) Successful in 4s

This commit is contained in:
2026-03-02 21:21:21 +00:00
parent 184c5cb59f
commit 6c26135cad
15 changed files with 206 additions and 13 deletions
+9 -1
View File
@@ -49,8 +49,16 @@ func main() {
service.BootstrapAdmin(adminPublicKey)
api := httpapi.NewAPI(service)
h := api.Routes()
if logDir := getEnv("LOG_DIR", "var/logs"); logDir != "" {
if wrapped, err := httpapi.WithRequestLogging(logDir, h); err != nil {
log.Printf("request logging disabled: %v", err)
} else {
h = wrapped
}
}
log.Printf("listening on %s", addr)
if err := http.ListenAndServe(addr, api.Routes()); err != nil {
if err := http.ListenAndServe(addr, h); err != nil {
log.Fatalf("listen: %v", err)
}
}