Files
fn-serverless/examples/hello-ruby/hello-async.sh
Seif Lotfy سيف لطفي 7ec037b46a Move hello-async.sh and hello-sync.sh to the ruby and go directories … (#176)
* Move hello-async.sh and hello-sync.sh to the ruby and go directories and get rid of examples in tools

* update hello-ruby code to use iron/hello:ruby images
2016-10-17 22:12:10 +02:00

23 lines
524 B
Bash
Executable File

#!/bin/bash
HOST="${1:-localhost:8080}"
REQ="${2:-1}"
curl -H "Content-Type: application/json" -X POST -d '{
"app": { "name":"myapp" }
}' http://$HOST/v1/apps
curl -H "Content-Type: application/json" -X POST -d '{
"route": {
"type": "async",
"path":"/hello-async",
"image":"iron/hello:ruby"
}
}' http://$HOST/v1/apps/myapp/routes
for i in `seq 1 $REQ`;
do
curl -H "Content-Type: application/json" -X POST -d '{
"name":"Johnny"
}' http://$HOST/r/myapp/hello-async
done;