Skip to content
Browser extension to create serverless functions from code snippets
JavaScript HTML
Branch: master
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
images
lib
providers
.gitignore
README.md
background.js
interface.js
manifest.json
options.html
options.js
package-lock.json
package.json
popup.html
popup.js
window.html
window.js
window_bundle.js

README.md

FuncFarm - Serverless browser extension

Func.Farm

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).

Build

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

Design

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.

Design Diagram

diagram

You can’t perform that action at this time.