A simple OpenWhisk application

Now let's create a simple service through the serverless Node.js template by going through the following steps:

  1. Create a new serverless service/project:
$ serverless create --template openwhisk-nodejs --path new-service 
  1. Change into the newly created directory:
$ cd new-service
  1. Install the npm dependencies:
$ npm install
  1. Once we finished, deploy the service and function to the Bluemix portal:
$ serverless deploy -v
  1. Then we invoke the function to check whether the function is deployed properly. Invoke the serverless application using the following code:
$ serverless invoke --function hello { "payload": "Hello, World!" }

In the preceding tutorial, we got the auth keys, created an action, and deployed ...

Get DevOps for Serverless Applications now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.