{"_id":"@tak-ps/serverless-http","name":"@tak-ps/serverless-http","dist-tags":{"latest":"3.4.0"},"versions":{"3.4.0":{"name":"@tak-ps/serverless-http","version":"3.4.0","description":"Use existing web application frameworks in serverless environments","main":"serverless-http.js","types":"serverless-http.d.ts","engines":{"node":">=12.0"},"directories":{"test":"test"},"repository":{"type":"git","url":"git+https://github.com/dougmoscrop/serverless-http.git"},"scripts":{"pretest":"tsc --strict --skipLibCheck --noEmit test/typecheck.ts","test":"nyc mocha","posttest":"eslint lib test","test:integration:offline":"mocha test/integration/test-offline.js --exit","test:integration:aws":"mocha test/integration/test-aws.js --exit","postpublish":"git push origin master --tags"},"keywords":["serverless","serverless applications","koa","express","connect","api gateway","lambda","aws","aws lambda","amazon","amazon web services"],"author":{"name":"Doug Moscrop","email":"doug.moscrop@gmail.com","url":"http://www.github.com/dougmoscrop"},"contributors":[{"name":"Doug Moscrop","url":"https://github.com/dougmoscrop"},{"name":"Kevin Groat","url":"https://github.com/kgroat"},{"name":"Kurt Miller","url":"https://github.com/bsdkurt"},{"name":"Roch Devost","url":"https://github.com/rochdev"},{"name":"Bryan Gamble","url":"https://github.com/bdgamble"},{"name":"Derek MacDonald","url":"https://github.com/demacdonald"},{"name":"Filip Skokan","url":"https://github.com/panva"},{"name":"Kevin Tonon","url":"https://github.com/ktonon"},{"name":"Mark Vayngrib","url":"https://github.com/mvayngrib"},{"name":"Tamás Máhr","url":"https://github.com/tamasmahr"},{"name":"Daniel Martin","url":"https://github.com/daniel-ac-martin"}],"homepage":"https://github.com/dougmoscrop/serverless-http","license":"MIT","devDependencies":{"@loopback/rest":"^11.1.2","@types/koa":"^2.11.0","body-parser":"^1.19.0","chai":"^4.2.0","chai-as-promised":"^7.1.1","cookie-parser":"^1.4.4","eslint":"^8.12.0","eslint-plugin-mocha":"^10.0.3","express":"^4.17.1","fastify":"^3.27.4","get-stream":"^5.1.0","hapi":"^18.1.0","inversify":"^6.0.1","inversify-express-utils":"^6.3.2","koa":"^2.11.0","koa-bodyparser":"^4.2.1","koa-compress":"^5.1.0","koa-route":"^3.2.0","koa-router":"^10.1.1","koa-static":"^5.0.0","lambda-log":"^3.1.0","mocha":"^9.2.2","morgan":"^1.9.1","nyc":"^15.0.0","on-finished":"^2.3.0","on-headers":"^1.0.2","pino":"^8.15.0","pino-http":"^8.5.0","polka":"^0.5.2","reflect-metadata":"^0.1.13","restana":"^4.0.7","sails":"^1.2.3","serverless":"^3.10.2","serverless-offline":"^12.0.4","serverless-plugin-common-excludes":"^4.0.0","serverless-plugin-custom-binary":"^2.0.0","serverless-plugin-include-dependencies":"^5.0.0","sinon":"^13.0.1","supertest":"^6.2.2","tree-kill":"^1.2.2","typescript":"^4.6.3"},"_id":"@tak-ps/serverless-http@3.4.0","gitHead":"067ef0cc77b86e66e470e53f7d2a5a8d7bfcb835","bugs":{"url":"https://github.com/dougmoscrop/serverless-http/issues"},"_nodeVersion":"23.8.0","_npmVersion":"11.3.0","dist":{"integrity":"sha512-BJujKgn0uGGk7fdyr0F4OYMf/oeWWweTiJ5ajN3sK/ybD+8M7iRAQRU70CHF0Gz5SSI+IloupQhtHsTQo98+6w==","shasum":"b68dd4e1d81536795df2fa2289208400e355b1ab","tarball":"https://registry.npmjs.org/@tak-ps/serverless-http/-/serverless-http-3.4.0.tgz","fileCount":25,"unpackedSize":38928,"signatures":[{"keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U","sig":"MEUCIQCpf4kK3rGisgRW7jAZwug+WJfGy6RX0uRtDMoW2tsSxgIgbBYvI8MkI2/hdXLx2lG055naCAurWfQRmEWa5JtaSek="}]},"_npmUser":{"name":"ingalls","email":"nick@ingalls.ca"},"maintainers":[{"name":"ingalls","email":"nick@ingalls.ca"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages-npm-production","tmp":"tmp/serverless-http_3.4.0_1744911759544_0.4448606854761623"},"_hasShrinkwrap":false}},"time":{"created":"2025-04-17T17:42:39.441Z","3.4.0":"2025-04-17T17:42:39.719Z","modified":"2025-04-17T17:42:40.005Z"},"maintainers":[{"name":"ingalls","email":"nick@ingalls.ca"}],"description":"Use existing web application frameworks in serverless environments","homepage":"https://github.com/dougmoscrop/serverless-http","keywords":["serverless","serverless applications","koa","express","connect","api gateway","lambda","aws","aws lambda","amazon","amazon web services"],"repository":{"type":"git","url":"git+https://github.com/dougmoscrop/serverless-http.git"},"contributors":[{"name":"Doug Moscrop","url":"https://github.com/dougmoscrop"},{"name":"Kevin Groat","url":"https://github.com/kgroat"},{"name":"Kurt Miller","url":"https://github.com/bsdkurt"},{"name":"Roch Devost","url":"https://github.com/rochdev"},{"name":"Bryan Gamble","url":"https://github.com/bdgamble"},{"name":"Derek MacDonald","url":"https://github.com/demacdonald"},{"name":"Filip Skokan","url":"https://github.com/panva"},{"name":"Kevin Tonon","url":"https://github.com/ktonon"},{"name":"Mark Vayngrib","url":"https://github.com/mvayngrib"},{"name":"Tamás Máhr","url":"https://github.com/tamasmahr"},{"name":"Daniel Martin","url":"https://github.com/daniel-ac-martin"}],"author":{"name":"Doug Moscrop","email":"doug.moscrop@gmail.com","url":"http://www.github.com/dougmoscrop"},"bugs":{"url":"https://github.com/dougmoscrop/serverless-http/issues"},"license":"MIT","readme":"# serverless-http\n\n## Description\n\nThis module allows you to 'wrap' your API for serverless use. No HTTP server, no ports or sockets. Just your code in the same execution pipeline you are already familiar with.\n\n## Sponsors\n\nThank you to Upstash for reaching out to sponsor this project!\n\n<table>\n<tr>\n<td>\n  <img width=\"1000\" height=\"0\">\n  <a href=\"https://upstash.com/?utm_source=serverless-http\" >\n  <img src=\"https://raw.githubusercontent.com/upstash/sponsorship/master/redis.png\" alt=\"Upstash\" width=\"260\" align=\"right\">\n  </a>\n<h3>Upstash: Serverless Database for Redis</h3>\n\n  <ul>\n    <li>Serverless Redis with global replication and durable storage</li>\n    <li>Price scales to zero with per request pricing</li>\n    <li>Built-in REST API designed for serverless and edge functions</li>\n  </ul>\n  \n[Start for free in 30 seconds!](https://upstash.com/?utm_source=serverless-http)\n</td>\n</tr>\n</table>\n\n## Support\n\n### Supported Frameworks\n(* Experimental)\n\n* Node (http.createServer)\n* Connect\n* Express\n* Koa\n* Restana\n* Sails *\n* Hapi *\n* Fastify *\n* Restify *\n* Polka *\n* Loopback *\n\n### Supported Providers\n\n* AWS\n* [Genezio](https://genezio.com/deploy-nodejs-express-on-genezio-serverless/)\n* Azure (Experimental, untested, probably outdated)\n\n## Deploy a Hello Word on Genezio\n:rocket: You can deploy your own hello world example using the Express framework to Genezio with one click:\n\n[![Deploy to Genezio](https://raw.githubusercontent.com/Genez-io/graphics/main/svg/deploy-button.svg)](https://app.genez.io/start/deploy?repository=https://github.com/Genez-io/express-getting-started)\n\n\n\n\n## Examples\n\nPlease check the `examples` folder!\n\n### Usage example using the Koa framework\n\n```javascript\nconst serverless = require('serverless-http');\nconst Koa = require('koa'); // or any supported framework\n\nconst app = new Koa();\n\napp.use(/* register your middleware as normal */);\n\n// this is it!\nmodule.exports.handler = serverless(app);\n\n// or as a promise\nconst handler = serverless(app);\nmodule.exports.handler = async (event, context) => {\n  // you can do other things here\n  const result = await handler(event, context);\n  // and here\n  return result;\n};\n```\n\n### Usage example using the Express framework with Azure\n\n```javascript\n\nconst serverless = require('serverless-http');\nconst express = require('express');\n\nconst app = express();\n\napp.use(/* register your middleware as normal */);\n\nconst handler = serverless(app, { provider: 'azure' });\nmodule.exports.funcName = async (context, req) => {\n  context.res = await handler(context, req);\n}\n\n```\n\n### Other examples\n[json-server-less-λ](https://github.com/pharindoko/json-server-less-lambda) - using serverless-http with json-server and serverless framework in AWS\n\n\n## Limitations\n\nYour code is running in a serverless environment. You cannot rely on your server being 'up' in the sense that you can/should not use in-memory sessions, web sockets, etc. You are also subject to provider specific restrictions on request/response size, duration, etc.\n\n> Think of this as a familiar way of expressing your app logic, *not* trying to make serverless do something it cannot.\n\n## Contributing\n\nPull requests are welcome! Especially test scenarios for different situations and configurations.\n\n## Further Reading\n\nHere are some [more detailed examples](./docs/EXAMPLES.md) and [advanced configuration options](./docs/ADVANCED.md) as well as [provider-specific documentation](./docs/PROVIDERS.md)\n\n","readmeFilename":"README.md","_rev":"1-0bfbdead0ddaf3df2420bd2ceeeda511"}