Don't forget to replace <NNN>
with your user number. Your lab instructor will give you your user number.
We will reuse the app you created in the Hello World - Node example. We will add the Go function to the same app.
fn init --runtime go --trigger http go-fn
cd go-fn
fn -v deploy --app ws<NNN>app --no-bump --no-cache
fn list functions ws<NNN>app
fn -v invoke ws<NNN>app go-fn --display-call-id Call ID: 01CWES47JM1BT0GGRZJ0000MN9 {"message":"Hello World"}
And you can pass parameters as shown below:
echo -n '{"name":"DOAG"}' | fn invoke ws<NNN>app go-fn --display-call-id --content-type application/json Call ID: 01CWES1FR11BT0GGRZJ0000MKW {"message":"Hello DOAG"}
Congratulations! You have successfully created, deployed and invoked your deployed Go function. Leave the app as-is for the next example in this workshop.