Add bun integration tests for docs flow, update integration guide
CI / test (push) Successful in 4s

- Add test/integration.test.ts: getServicePublicKey, full flow (register, login, createCollection, createPointFeature, listFeatures)
- Update docs example: registerBySigningServiceKey then loginWithSignature
- Document integration tests in typescript-frontend-integration.md

Made-with: Cursor
This commit is contained in:
2026-03-01 13:08:09 +00:00
parent 18328706bd
commit a295e36bac
14 changed files with 654 additions and 14 deletions
+16 -2
View File
@@ -27,8 +27,22 @@ func main() {
servicePublicKey = adminPublicKey
}
memory := store.NewMemoryStore()
service := app.NewService(memory, app.Config{
var st store.Store
if databaseURL := os.Getenv("DATABASE_URL"); databaseURL != "" {
if err := store.Migrate(databaseURL); err != nil {
log.Fatalf("migrate: %v", err)
}
pg, err := store.NewPostgresStore(databaseURL)
if err != nil {
log.Fatalf("postgres: %v", err)
}
defer pg.Close()
st = pg
} else {
st = store.NewMemoryStore()
}
service := app.NewService(st, app.Config{
ChallengeTTL: 5 * time.Minute,
SessionTTL: 24 * time.Hour,
}, servicePublicKey)