@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.
2 lines • 795 B
JavaScript
import{t as i}from"../../chunk-6BLWJRLG.mjs";import{a as s}from"../../chunk-QWPVIX2T.mjs";import{createServer as S}from"node:http";var u=8e3,d=class{constructor(e){this.options=e}static{s(this,"HttpHuaweiHandler")}getHandler(e,v,m,l,E,A,t){let c=s((r,o)=>{v.sendRequest(e,r,o)},"requestListener"),n=i(this.options?.httpServerFactory,this.createHttpServer.bind(this))(c),p=i(this.options?.port,u);return n.listen(p,()=>{t.debug("SERVERLESS_ADAPTER:PROXY: Server started."),t.debug(`SERVERLESS_ADAPTER:PROXY: Listening the Huawei Requests in port ${p}`)}),()=>(t.debug("SERVERLESS_ADAPTER:PROXY: Disposing the server"),new Promise((r,o)=>{n.close(a=>a?o(a):r())}))}createHttpServer(e){return S(e)}};export{u as DEFAULT_HUAWEI_LISTEN_PORT,d as HttpHuaweiHandler};
//# sourceMappingURL=index.mjs.map