Skip to content

Latest commit

 

History

History
31 lines (19 loc) · 904 Bytes

README.md

File metadata and controls

31 lines (19 loc) · 904 Bytes

Sample Serverless Function using OpenFaas Templates

  • python3-sample is a sample function written in python3 using python3 template To deploy the function we need to execute the below commands
export OPENFAAS_PREFIX=sumand
faas-cli up -f python3-sample/python-hello-world.yml

To invoke the function we need to run the below commands


curl http://127.0.0.1:8080/function/py-hello-world --data-binary '{ "name": "Suman", "greeting": "Hello" }'

export OPENFAAS_PREFIX=sumand
faas-cli up -f dockerfile-sample/sample-flask-service.yml

curl http://127.0.0.1:8080/function/sample-flask-service/api/items