MCPcopy Create free account
hub / github.com/UsefulSoftwareCo/executor / setup

Function setup

apps/cloud/scripts/test-globalsetup.ts:22–36  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

20let server: PGLiteSocketServer | undefined;
21
22export default async function setup() {
23 db = await PGlite.create();
24 await migrate(drizzle(db), { migrationsFolder: MIGRATIONS_FOLDER });
25
26 server = new PGLiteSocketServer({ db, port: PORT, host: "127.0.0.1" });
27 await server.start();
28
29 // eslint-disable-next-line no-console
30 console.log(`[test-db] PGlite socket server listening on 127.0.0.1:${PORT}`);
31
32 return async () => {
33 await server?.stop();
34 await db?.close();
35 };
36}

Callers

nothing calls this directly

Calls 3

logMethod · 0.80
startMethod · 0.65
closeMethod · 0.65

Tested by

no test coverage detected