To provide a smart overview how Azure Stack Functions work and how to use them, a simple hello world function is described here.
To start, you just have to deploy the corresponding Function App
:
For being deployed, you will have to set a unique name and a storage account. After it has been deployed, you can set your function type:
And now you can start writing your code:
In the function detail, you will find the following view:
As you can see, you can define the Triggers
, the Inputs
, and the Outputs
:
You can write the code for your function in a language of your choice and save the code and configuration files in the same folder. The JSON configuration data is being named function.json
. It defines the bindings
and other configuration settings. The function uses this file to determine how to send data into and return it from function execution.
This is a sample JSON file:
The code for the functions in a defined Function App has to be saved in a root
folder...