fn: improve docs (#377)

Continues #359
This commit is contained in:
C Cirello
2016-12-03 11:50:25 +01:00
committed by GitHub
parent e104db5a3f
commit 4505811fb0
2 changed files with 6 additions and 2 deletions

View File

@@ -11,8 +11,10 @@ docker run --rm -v "$PWD":/worker -w /worker iron/ruby:dev bundle install --stan
fn build
# test it
cat hello.payload.json | fn run
# push it to Docker Hub
fn push
# 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

View File

@@ -11,8 +11,10 @@ docker run --rm -v "$PWD":/worker -w /worker iron/ruby:dev bundle install --stan
fn build
# test it
cat slack.payload | fn run
# push it to Docker Hub
fn push
# 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
curl -X PUT http://127.0.0.1:8080/v1/apps/slackbot/routes/guppy -d '{ "route": { "headers": { "Content-type": ["application/json"] } } }'
```