Skip to content

Latest commit

 

History

History

function-examples

OpenFaaS Functions in Idris 2

Hello world OpenFaaS Function in Idris 2.

See the idris- prefixed directories to find the Idris 2 Function code examples.

The following documentation explains how to run these Functions in OpenFaaS.

See OpenFaaS website for more detailed and up to date documentation.

Prerequisites

Get OpenFaaS template

Get the Idris 2 OpenFaaS template:

faas template pull https://github.com/ccfontes/faas-idris2

Environment variables

export DOCKER_REGISTRY_IMG_ORG_PATH=<registry org path>

Check stack.yml to find out how DOCKER_REGISTRY_IMG_ORG_PATH is used.

Building and deploying your function

To build and deploy the Functions to OpenFaaS, run the following command:

faas up

Testing a function

Test a Function using the OpenFaaS UI or with the following command:

echo "world" | faas invoke idris2-hello

Should ouput "Hello, world" string to the terminal.