Add local-first race hub API

This commit is contained in:
2026-05-25 00:49:13 -04:00
parent 517c6b987b
commit e08255db70
16 changed files with 1231 additions and 118 deletions

View File

@@ -61,7 +61,20 @@ func main() {
if *webMode {
log.SetOutput(os.Stderr) // web mode logs to stderr, not file
fmt.Printf("box-box web → http://localhost:%d\n", *port)
srv := web.NewServer(client, *port)
var domainStore *store.Store
db := *dbPath
if db == "" {
db = store.DefaultDBPath()
}
if st, err := store.Open(db); err != nil {
log.Printf("web: domain database unavailable (%s): %v", db, err)
} else {
domainStore = st
defer domainStore.Close()
}
srv := web.NewServer(client, *port, domainStore)
log.Fatal(srv.Start())
return
}