Files
remanso-jetstream/server.ts
Julien Calixte 8964f66184 refactor(server): extract createApp and add auth/admin test seams
createApp() builds the Application without listening, so tests
can call app.handle() directly. The listen call is gated behind
import.meta.main so importing server.ts no longer boots a port.
ADMIN_DIDS is read inside requireAdmin on each call (was frozen
at module load), and a mutable authenticator indirection lets
tests stub authenticateRequest via _setAuthenticatorForTest.
2026-06-07 22:05:12 +02:00

8.3 KiB