UNPKG

@h4ad/serverless-adapter

Version:

Run REST APIs and other web applications using your existing Node.js application framework (NestJS, Express, Koa, Hapi, Fastify and many others), on top of AWS, Azure, Digital Ocean and many other clouds.

1 lines 1.14 kB
{"version":3,"sources":["../../../src/frameworks/polka/index.ts","../../../src/frameworks/polka/polka.framework.ts"],"sourcesContent":["export * from './polka.framework';\n","//#region Imports\n\nimport type { IncomingMessage, ServerResponse } from 'http';\nimport polka, { type Polka } from 'polka';\nimport type { FrameworkContract } from '../../contracts';\n\n//#endregion\n\n/**\n * The framework that forwards requests to polka handler\n *\n * @breadcrumb Frameworks / PolkaFramework\n * @public\n */\nexport class PolkaFramework implements FrameworkContract<Polka> {\n /**\n * {@inheritDoc}\n */\n sendRequest(\n app: Polka,\n request: IncomingMessage,\n response: ServerResponse<IncomingMessage>,\n ): void {\n app.handler(request as polka.Request, response);\n }\n}\n"],"mappings":"4dAAA,IAAAA,EAAA,GAAAC,EAAAD,EAAA,oBAAAE,IAAA,eAAAC,EAAAH,GCGA,IAAAI,EAAkC,iBAW3B,IAAMC,EAAN,KAAyD,CAdhE,MAcgE,CAAAC,EAAA,uBAI9D,YACEC,EACAC,EACAC,EACM,CACNF,EAAI,QAAQC,EAA0BC,CAAQ,CAChD,CACF","names":["polka_exports","__export","PolkaFramework","__toCommonJS","import_polka","PolkaFramework","__name","app","request","response"]}