MCPcopy Create free account
hub / github.com/honojs/node-server / createBodyLimitApp

Function createBodyLimitApp

test/server-socket.test.ts:21–34  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

19const nodeVersionV20OrLater = parseInt(process.version.slice(1).split('.')[0]) >= 20
20
21const createBodyLimitApp = () => {
22 const app = new Hono()
23
24 app.post(
25 '/',
26 bodyLimit({
27 maxSize: 1024 * 1024,
28 onError: (c) => c.text('Payload exceeded', 413),
29 }),
30 (c) => c.text('ok')
31 )
32
33 return app
34}
35
36describe('autoCleanupIncoming: true (default)', () => {
37 let address: AddressInfo

Callers 1

Calls

no outgoing calls

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…