mirror of
https://github.com/fnproject/fn.git
synced 2022-10-28 21:29:17 +03:00
* Added high level roadmap. * Changed to funtion.yaml. * Added logo * updating quickstart code example, WIP, waiting on another merge. * Minor updates. * Changed function.yaml to func.yaml and updated fnctl README.
584 B
584 B
Quick Example for a Go Function (3 minutes)
This example will show you how to test and deploy Go (Golang) code to IronFunctions.
# create your func.yaml file
fnctl init <YOUR_DOCKERHUB_USERNAME>/hello
# build the function
fnctl build
# test it
cat hello.payload.json | fnctl run
# push it to Docker Hub
fnctl push
# Create a route to this function on IronFunctions
fnctl routes create myapp /hello
Now you can call your function on IronFunctions:
curl -H "Content-Type: application/json" -X POST -d @hello.payload.json http://localhost:8080/r/myapp/hello