mirror of
https://github.com/fnproject/fn.git
synced 2022-10-28 21:29:17 +03:00
@@ -11,8 +11,10 @@ docker run --rm -v "$PWD":/worker -w /worker iron/ruby:dev bundle install --stan
|
|||||||
fn build
|
fn build
|
||||||
# test it
|
# test it
|
||||||
cat hello.payload.json | fn run
|
cat hello.payload.json | fn run
|
||||||
|
# push it to Docker Hub
|
||||||
|
fn push
|
||||||
# Create a route to this function on IronFunctions
|
# Create a route to this function on IronFunctions
|
||||||
fn deploy myapp
|
fn routes create myapp /hello
|
||||||
```
|
```
|
||||||
|
|
||||||
Now surf to: http://localhost:8080/r/myapp/hello
|
Now surf to: http://localhost:8080/r/myapp/hello
|
||||||
|
|||||||
@@ -11,8 +11,10 @@ docker run --rm -v "$PWD":/worker -w /worker iron/ruby:dev bundle install --stan
|
|||||||
fn build
|
fn build
|
||||||
# test it
|
# test it
|
||||||
cat slack.payload | fn run
|
cat slack.payload | fn run
|
||||||
|
# push it to Docker Hub
|
||||||
|
fn push
|
||||||
# Create a route to this function on IronFunctions
|
# Create a route to this function on IronFunctions
|
||||||
fn deploy slackbot
|
fn routes create slackbot /guppy
|
||||||
# Change the route response header content-type to application/json
|
# Change the route response header content-type to application/json
|
||||||
curl -X PUT http://127.0.0.1:8080/v1/apps/slackbot/routes/guppy -d '{ "route": { "headers": { "Content-type": ["application/json"] } } }'
|
curl -X PUT http://127.0.0.1:8080/v1/apps/slackbot/routes/guppy -d '{ "route": { "headers": { "Content-type": ["application/json"] } } }'
|
||||||
```
|
```
|
||||||
|
|||||||
Reference in New Issue
Block a user