Files
fn-serverless/examples/extensions
Reed Allman 1cdb47d6e9 server, examples, extensions lint compliant (#1109)
these are all automated changes suggested by golint
2018-07-04 15:23:15 +01:00
..
2017-01-30 12:14:28 -08:00
2018-05-09 10:52:52 +03:00

Extensions Example

This example adds extra endpoints to the API. See main.go for example code.

Building and Running

go build
./extensions

First create an app myapp and a function myroute. Then test with:

curl http://localhost:8080/v1/custom1
curl http://localhost:8080/v1/custom2
curl http://localhost:8080/v1/apps/myapp/custom3
curl http://localhost:8080/v1/apps/myapp/custom4
curl http://localhost:8080/v1/apps/myapp/routes/myroute/custom5
curl http://localhost:8080/v1/apps/myapp/routes/myroute/custom5