Deploying a simple function
Now that we have our Funktion deployment up-and-running, we can look at deploying a really simple hello world example. In the /Chapter05/hello-world/src
folder in the GitHub repository that supports this book, you will find a file called hello.js
. This file contains the following code:
module.exports = function(context, callback) { var name = context.request.query.name || context.request.body || "World"; callback(200, "Hello " + name + "!!"); };
Running the following command in the /Chapter05/hello-world/
folder will create our first function using the preceding code:
$ funktion create fn -f src/hello.js
The output should look like this:

As you can see from the Terminal output, this has created a function
called hello
. Now, we have function
running the following command:
$ funktion get function
This should return some results. As you can see from the following output, we can now see the NAME
, PODS
, and URL
listed:

We can run the following commands to return just...