The creation of serverless function is effortless!
After installation of CLI, configure
OpenWhisk to point towards Hypi's endpoint. Once it gets configured, you are ready to create a Serverless function.
We will be using
Let's follow the below steps to create
- Create Java Script file action.js in a folder. Write 'Hello World' function in it.
- Create an action called
hithere gets listed on a namespace on the Hypi platform.
- Invoke an action
hithere. This is an activation of the serverless function. Now, your action is ready to use on Hypi platform as serverless function.
--param takes input parameters for the function.
--result shows the result of the function.
- If you invoke the function without
--resultparameter, you will get the activation
idof the action
- You may get activation details of the action using the
idreceived in the previous step.
- You may retrieve the action list and namespace list with the following commands.
- Verify that the action was invoked by checking the activations list: