This repository contains a simple abstaction layer to translate various serverless host environments and localhost to a common open-standards defined request and response context.
Serverless hosts including AWS Lambda, Microsoft Azure Functions and Google Cloud Functions let you run code without provisioning or managing servers. You generally pay only for the compute time you consume - there is usually no charge when your code is not running. You can run code for virtually any type of application or backend service - all with zero administration.
It is currently not possible to reuse the same codeset across multiple cloud hosts, and yet the functionality provided by the host environment is very similar -- typically providing a request record for the inbound event trigger and a context record for the response. It is also not possible to develop and test locally without additional frameworks that vary based on the target host.
This libraryprovides a very lightweight abstraction layer to translate the request and response into a format that can be reused regardless of the host environment, and can be used locally just as easily as remotely.
It is now possible to write a single serverless function and host on multiple providers (to optimize pricing, load balance during catastrophic service provider failures etc.)
Middleware/Application Pipeline Builder: AppBuilder
Adds a middleware node to the IOPA function pipeline. The middleware are
invoked in the order they are added: the first middleware passed to
be the outermost function, and the last middleware passed to Use will be the
example index.js for Azure
const iopaServerless=demo = ;moduleexports = iopaCloud;