FuncFarm allows users to quickly create serverless functions by right clicking on selected code snippets, and selecting "create serverless function".
Functions are saved in users account with a cloud provider of his choice (must provide credentials).
To build, use-
npm install
browserify window.js -o window_bundle.js
or to monitor files and recompile on change:
watchify window.js -o window_bundle.js
FuncFarm is meant to be modular. Cloud provider wrappers are stored in providers/
folder and are expected to manage all requirements specific to that cloud provider.
interface.js
serves as a unified interface to load the requested provider wrapper and call runFunc
which all providers should export.
A provider wrapper injects additional input fields to window.html that are required.
For example, AWS Lambda required a "Handler" be set - the entry point for the function.
Therefore providers/aws-wrapper.js
should inject a Handler input to the extension screen and extract its value when creating functions.
Provider wrapper should also manage saved credentials as each cloud required a different set, for example -
AWS Lambda auth required Key, Secret, and Role ARN (see hardcoded values in aws-wrapper).
OpenWhisk (IBM) required UID, Key, and API endpoint (HTTP).
So the login for should also be injected to window.html by the provider wrapper, with its unique fields.