feat: add ax serve command with JSON API backed by NodeService

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
2026-04-01 13:04:29 +02:00
parent 9e5194893e
commit 3dfc46c3ff
5 changed files with 256 additions and 2 deletions

View File

@@ -82,3 +82,14 @@ func GetNodeService(cfg Config) (NodeService, error) {
}
return &nodeServiceImpl{store: st, userID: user}, nil
}
func GetNodeServiceForUser(user string) (NodeService, error) {
if user == "" {
return nil, fmt.Errorf("user is required")
}
st, err := store.FindAndOpenSQLiteStore()
if err != nil {
return nil, err
}
return &nodeServiceImpl{store: st, userID: user}, nil
}