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 the function through Serverless Framework. In the next section, we will look into setting up CI and CD through different methodologies.