This example counts the amount of people in space using the Open Notify API through a Node.js function and OpenFaaS.
You can use it as a template to build your own function.
git clone https://github.com/alexellis/spacecountfunction
- Build / deploy / invoke
faas-cli build \
&& faas-deploy
Then:
echo -n | faas-cli invoke webreq