Security News
Opengrep Emerges as Open Source Alternative Amid Semgrep Licensing Controversy
Opengrep forks Semgrep to preserve open source SAST in response to controversial licensing changes.
@btakita/serverless-http
Advanced tools
Use existing web application frameworks in serverless environments
The 2.0 release moves to async/await and requires Node 8+.
All frameworks have been updated to their latest versions.
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.
(* Experimental)
Please check the examples
folder!
const serverless = require('serverless-http');
const Koa = require('koa'); // or any supported framework
const app = new Koa();
app.use(/* register your middleware as normal */);
// this is it!
module.exports.handler = serverless(app);
// or as a promise
const handler = serverless(app);
module.exports.handler = async (event, context) => {
// you can do other things here
const result = await handler(event, context);
// and here
return result;
};
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
FAQs
Use existing web application frameworks in serverless environments
The npm package @btakita/serverless-http receives a total of 3 weekly downloads. As such, @btakita/serverless-http popularity was classified as not popular.
We found that @btakita/serverless-http demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Security News
Opengrep forks Semgrep to preserve open source SAST in response to controversial licensing changes.
Security News
Critics call the Node.js EOL CVE a misuse of the system, sparking debate over CVE standards and the growing noise in vulnerability databases.
Security News
cURL and Go security teams are publicly rejecting CVSS as flawed for assessing vulnerabilities and are calling for more accurate, context-aware approaches.