Make sure serverless
is installed. See installation guide.
serverless create --template openwhisk-nodejs --path myService
or sls create --template openwhisk-nodejs --path myService
, where 'myService' is a new folder to be created with template service files. Change directories into this new folder.
npm install
in the service directory.
serverless deploy
or sls deploy
. sls
is shorthand for the Serverless CLI command
serverless invoke --function helloWorld
or serverless invoke -f helloWorld
-f
is shorthand for --function
In your terminal window you should see the response from Apache OpenWhisk
{
"payload": "Hello, World!"
}
Congrats you have deployed and ran your Hello World function!
Product