Files
fn-serverless/examples/tutorial/hotfunctions/http/go
Denis Makogon 783490dc79 Addressing certain comments
What's new?
 - better error handling
 - still need to decode JSON from function because we need status code and body
 - prevent request body to be a problem by deferring its close
 - moving examples around: putting http and json samples into one folder
2017-10-07 00:43:07 +03:00
..
2017-10-02 20:14:51 -07:00

Hot Function Example

This is an example of a hot function. The hot function documentation contains an analysis of how this example works.

How to run the example

Install the CLI tool, start a Fn server and run docker login to login to DockerHub. See the front page for instructions.

Set your Docker Hub username

export FN_REGISTRY=<DOCKERHUB_USERNAME>

Build and deploy the function to the Fn server (default localhost:8080)

fn deploy --app hot-app

Now call your function:

curl -X POST -d "World" http://localhost:8080/r/hot-app/hotfn-go