mirror of
https://github.com/fnproject/fn.git
synced 2022-10-28 21:29:17 +03:00
* API endpoint extensions working. extensions example. * Added server.NewEnv and some docs for the API extensions example. extensions example. example main.go. * Uncommented special handler stuff. * Added section in docs for extending API linking to example main.go. * Commented out special_handler test * Changed to NewFromEnv
23 lines
396 B
Markdown
23 lines
396 B
Markdown
# Extensions Example
|
|
|
|
This example adds extra endpoints to the API.
|
|
|
|
## Building and Running
|
|
|
|
```sh
|
|
go build -o functions
|
|
./functions
|
|
```
|
|
|
|
Then test with:
|
|
|
|
```sh
|
|
# First, create an app
|
|
fn apps create myapp
|
|
# And test
|
|
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
|
|
```
|