Add README for hotfunctions go example and update docs to point to it

This commit is contained in:
Nigel Deakin
2017-09-29 12:01:29 +01:00
parent 4afe06adc7
commit 16cdd98a62
4 changed files with 29 additions and 8 deletions

View File

@@ -0,0 +1,22 @@
# Hot Function Example
This is an example of a hot function. The [hot function documentation](/docs/hot-functions.md) 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](README.md) 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/%2Fhotfn-go
```