Files
fn-serverless/examples/formats/http/go
Reed Allman a4de984f79 add fdk-go to main docs (#412)
* add fdk-go to main docs

* add note about using fdk-go to hot example
2017-10-09 14:43:28 -07:00
..
2017-10-07 00:43:09 +03:00
2017-10-07 00:43:07 +03:00
2017-10-07 00:43:07 +03:00
2017-10-09 14:43:28 -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.

Note that you should probably be using the fdk but this serves as a good example of how to do a hot functions raw without the fdk.

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