added api logic, vitest, minimal testing ui

This commit is contained in:
2025-11-15 23:26:57 -06:00
parent f4160b91db
commit 4eae966f96
95 changed files with 14155 additions and 469 deletions

8
api/tests/appFactory.ts Normal file
View File

@@ -0,0 +1,8 @@
import type { FastifyInstance } from "fastify";
export default async function appFactory(): Promise<FastifyInstance> {
// env is already set in tests/setup.ts, so now we can import
const { default: app } = await import("../src/server"); // ESM + TLA safe
await app.ready(); // ensure all plugins registered
return app;
}