Quick Start Guide
Deploy your first serverless function in under 5 minutes. No servers, no configuration — just code.
Install the CLI
Download and install the OpenWhisk CLI (wsk) and configure your API host.
# Download wsk CLI from GitHub releases $ curl -L https://github.com/apache/openwhisk-cli/releases/latest -o wsk # Set API host $ wsk property set --apihost \ https://fnc.evrtng.cloud # Set auth key (from your dashboard) $ wsk property set --auth \ YOUR_AUTH_KEY
Write Your Function
Create a function file. The main() function receives params and returns a JSON result.
// hello.js function main(params) { const name = params.name || 'World'; return { message: `Hello, ${name}!` }; }
Deploy
Create the action on the evrtng functions platform.
$ wsk action create helloAction hello.js ok: created action helloAction # For dependencies: use a ZIP $ zip -r action.zip * $ wsk action create myAction \ --kind nodejs:18 action.zip
Invoke & Test
Invoke synchronously for instant results, or expose as a Web Action for HTTP access.
# Blocking invoke $ wsk action invoke helloAction \ --result --param name "evrtng" { "message": "Hello, evrtng!" } # Expose as Web Action $ wsk action update helloAction --web true $ wsk action get helloAction --url https://fnc.evrtng.cloud/api/v1/web/.../helloAction
Monitor & Scale
View logs, activation history, and let OpenWhisk handle scaling automatically.
# List recent activations $ wsk activation list --limit 5 # View logs for an activation $ wsk activation logs <ACTIVATION_ID> # List all your actions $ wsk action list
Cheat Sheet
# Action management $ wsk action create <name> file.js $ wsk action update <name> file.js $ wsk action invoke <name> --result $ wsk action get <name> $ wsk action delete <name> $ wsk action list # Pass parameters $ wsk action invoke <name> \ --param key "value" # Web Actions $ wsk action update <name> --web true $ wsk action get <name> --url # Sequences $ wsk action create mySeq \ --sequence fn1,fn2,fn3 # Monitoring $ wsk activation list $ wsk activation logs <id> $ wsk activation get <id>
