Gathering detailed insights and metrics for serverless-http
Gathering detailed insights and metrics for serverless-http
Gathering detailed insights and metrics for serverless-http
Gathering detailed insights and metrics for serverless-http
tencent-serverless-http
This library enables you to utilize Tencent Cloud API Gateway to respond to web and API requests using your existing Node.js application framework.
@tsed/platform-serverless-http
Module to support Serverless HTTP function with Ts.ED
serverless-offline
Emulate AWS λ and API Gateway locally when developing your Serverless project
@midwayjs/serverless-http-parser
parse http/apigw trigger event to koa ctx.
Use your existing middleware framework (e.g. Express, Koa) in AWS Lambda 🎉
npm install serverless-http
Typescript
Module System
Min. Node Version
Node Version
NPM Version
98.8
Supply Chain
100
Quality
80.9
Maintenance
100
Vulnerability
100
License
JavaScript (99.41%)
TypeScript (0.59%)
Total Downloads
39,919,817
Last Day
10,357
Last Week
199,158
Last Month
864,441
Last Year
9,780,207
NOASSERTION License
1,761 Stars
340 Commits
168 Forks
17 Watchers
7 Branches
49 Contributors
Updated on Jun 30, 2025
Minified
Minified + Gzipped
Latest Version
3.2.0
Package Id
serverless-http@3.2.0
Unpacked Size
35.78 kB
Size
10.64 kB
File Count
23
NPM Version
9.2.0
Node Version
18.12.1
Published on
Mar 11, 2023
Cumulative downloads
Total Downloads
Last Day
-5%
10,357
Compared to previous day
Last Week
-9.1%
199,158
Compared to previous week
Last Month
0.8%
864,441
Compared to previous month
Last Year
28.1%
9,780,207
Compared to previous year
38
This 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.
Thank you to Upstash for reaching out to sponsor this project!
(* Experimental)
Please check the examples
folder!
1const serverless = require('serverless-http'); 2const Koa = require('koa'); // or any supported framework 3 4const app = new Koa(); 5 6app.use(/* register your middleware as normal */); 7 8// this is it! 9module.exports.handler = serverless(app); 10 11// or as a promise 12const handler = serverless(app); 13module.exports.handler = async (event, context) => { 14 // you can do other things here 15 const result = await handler(event, context); 16 // and here 17 return result; 18};
1 2const serverless = require('serverless-http'); 3const express = require('express'); 4 5const app = express(); 6 7app.use(/* register your middleware as normal */); 8 9const handler = serverless(app, { provider: 'azure' }); 10module.exports.funcName = async (context, req) => { 11 context.res = await handler(context, req); 12} 13
json-server-less-λ - using serverless-http with json-server and serverless framework in AWS
Your 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.
Think of this as a familiar way of expressing your app logic, not trying to make serverless do something it cannot.
Pull requests are welcome! Especially test scenarios for different situations and configurations.
Here are some more detailed examples and advanced configuration options as well as provider-specific documentation
No vulnerabilities found.
Reason
no dangerous workflow patterns detected
Reason
no binaries found in the repo
Reason
license file detected
Details
Reason
Found 9/15 approved changesets -- score normalized to 6
Reason
dependency not pinned by hash detected -- score normalized to 3
Details
Reason
detected GitHub workflow tokens with excessive permissions
Details
Reason
0 commit(s) and 0 issue activity found in the last 90 days -- score normalized to 0
Reason
no effort to earn an OpenSSF best practices badge detected
Reason
security policy file not detected
Details
Reason
project is not fuzzed
Details
Reason
branch protection not enabled on development/release branches
Details
Reason
SAST tool is not run on all commits -- score normalized to 0
Details
Reason
42 existing vulnerabilities detected
Details
Score
Last Scanned on 2025-06-30
The Open Source Security Foundation is a cross-industry collaboration to improve the security of open source software (OSS). The Scorecard provides security health metrics for open source projects.
Learn More