JSPM

  • Created
  • Published
  • Downloads 26
  • Score
    100M100P100Q69092F
  • License MIT

Export node.js applications into serverless compatible functions

Package Exports

  • @stormkit/serverless
  • @stormkit/serverless/dist/serverless.js

This package does not declare an exports field, so the exports above have been automatically detected and optimized by JSPM instead. If any package subpath is missing, it is recommended to post an issue to the original package (@stormkit/serverless) to support the "exports" field. If that is not possible, create a JSPM override to customize the exports field for this package.

Readme

Stormkit Serverless

Export node.js applications into serverless compatible functions

Note This package is still under development and there is no published package yet.

Why?

Stormkit servesless provides handy wrappers to make your code work in serverless environments.

Example usage

import http from "http";
import serverless from "@stormkit/serverless";

export const handler = serverless.awsAlb(
  (req: http.IncomingMessage, res: http.ServerResponse) => {
    res.write("Hello from " + req.url);
    res.end();
  }
);

This makes your function much more portable. The wrapper will take the incoming event and transform it into a Node.js http.IncomingMessage object.

Currently supported signatures

Each provider has it's own signature to call a serverless function. Here's the list of the currently supported providers:

License

Made with 💛 Published under MIT.