MCPcopy Create free account
hub / github.com/boringstack-xyz/boringstack / buildApp

Function buildApp

apps/api/tests/middleware/body-limit.test.ts:11–21  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

9import { errorHandler } from "../../src/middleware/error-handler";
10
11const buildApp = () =>
12 new Elysia()
13 .onError(({ code, error, set }) =>
14 errorHandler({ code: String(code), error, set })
15 )
16 .use(bodyLimit)
17 .post("/echo", ({ body }) => ({ ok: true, body }), {
18 body: t.Unknown(),
19 response: t.Object({ ok: t.Boolean(), body: t.Unknown() }),
20 detail: { tags: ["Test"] },
21 });
22
23const ECHO_URL = "http://localhost/echo";
24

Callers 1

body-limit.test.tsFile · 0.70

Calls 1

errorHandlerFunction · 0.90

Tested by

no test coverage detected