mirror of
https://github.com/AmanTahiliani/box-box.git
synced 2026-12-05 14:44:41 -05:00
Add local-first race hub API
This commit is contained in:
1 parent
517c6b987b
commit
e08255db70
16 files changed
+1231
-118
No files matched your search
+14
-1
@@ -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
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user