mirror of
https://github.com/hanzoai/trpc-openapi.git
synced 2026-10-30 18:18:55 +00:00
11 lines
485 B
JavaScript
11 lines
485 B
JavaScript
import { incomingMessageToRequest } from '@trpc/server/adapters/node-http';
|
|
import { createOpenApiNodeHttpHandler, } from './node-http/core.mjs';
|
|
export const createOpenApiHttpHandler = (opts) => {
|
|
const openApiHttpHandler = createOpenApiNodeHttpHandler(opts);
|
|
return async (req, res) => {
|
|
await openApiHttpHandler(incomingMessageToRequest(req, res, {
|
|
maxBodySize: opts.maxBodySize ?? null,
|
|
}), res);
|
|
};
|
|
};
|
|
//# sourceMappingURL=standalone.js.map
|