npm.io
0.1.0 • Published 6 years agoCLI

bin2faas

Licence
MIT
Version
0.1.0
Deps
1
Size
18 kB
Vulns
0
Weekly
0

bin2faas

Turn binaries into FaaS functions

Install globally

npm i bin2faas -g

Usage

$ bin2faas OPTIONS... BINARYPATHS...
  
  Options
    --name <FUNCTIONNAME>  
    --google  Build for Google
    --amazon  Build for Amazon

Example

Create
bin2faas --name myFirstFunc --amazon --google ./helloworld.out
Deploy
cd amazon
npm run deploy

# or

cd google
npm run deploy
Call

When invoking your function, specify the 'commands' field in the payload:

...
commands: [ 'ls -la', './helloworld.out' ],
...

These commands will be executed in sequence.

Output

STDOUT and STDERR will be logged by the FaaS Platform (AWS Logs, GC Logs)

License

MIT