mirror of
https://github.com/fnproject/fn.git
synced 2022-10-28 21:29:17 +03:00
Address broken tests
This commit is contained in:
committed by
James Jeffrey
parent
04008c71fd
commit
31b4ac4516
@@ -25,12 +25,12 @@ Now that we have an app, we can route endpoints to functions.
|
||||
### Add a Route
|
||||
|
||||
A route is a way to define a path in your application that maps to a function. In this example, we'll map
|
||||
`/hello` to a simple `Hello World!` function called `treeder/hello` which is a function we already made that you
|
||||
`/hello` to a simple `Hello World!` function called `funcy/hello` which is a function we already made that you
|
||||
can use -- yes, you can share functions! The source code for this function is in the [examples directory](examples/hello/go).
|
||||
You can read more about [writing your own functions here](docs/writing.md).
|
||||
|
||||
```sh
|
||||
fn routes create myapp /hello -i treeder/hello
|
||||
fn routes create myapp /hello -i funcy/hello
|
||||
```
|
||||
|
||||
Or using cURL:
|
||||
@@ -39,7 +39,7 @@ Or using cURL:
|
||||
curl -H "Content-Type: application/json" -X POST -d '{
|
||||
"route": {
|
||||
"path":"/hello",
|
||||
"image":"treeder/hello"
|
||||
"image":"funcy/hello"
|
||||
}
|
||||
}' http://localhost:8080/v1/apps/myapp/routes
|
||||
```
|
||||
@@ -101,7 +101,7 @@ curl -H "Content-Type: application/json" -X POST -d '{
|
||||
"route": {
|
||||
"type": "async",
|
||||
"path":"/hello-async",
|
||||
"image":"treeder/hello"
|
||||
"image":"funcy/hello"
|
||||
}
|
||||
}' http://localhost:8080/v1/apps/myapp/routes
|
||||
```
|
||||
|
||||
Reference in New Issue
Block a user