mirror of
https://github.com/fnproject/fn.git
synced 2022-10-28 21:29:17 +03:00
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
This commit is contained in:
committed by
GitHub
parent
0270eca460
commit
7ec037b46a
23
examples/hello-go/hello-async.sh
Executable file
23
examples/hello-go/hello-async.sh
Executable file
@@ -0,0 +1,23 @@
|
||||
#!/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"
|
||||
}
|
||||
}' 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;
|
||||
23
examples/hello-go/hello-sync.sh
Executable file
23
examples/hello-go/hello-sync.sh
Executable file
@@ -0,0 +1,23 @@
|
||||
#!/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": "sync",
|
||||
"path":"/hello-sync",
|
||||
"image":"iron/hello"
|
||||
}
|
||||
}' 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-sync
|
||||
done;
|
||||
23
examples/hello-ruby/hello-async.sh
Executable file
23
examples/hello-ruby/hello-async.sh
Executable file
@@ -0,0 +1,23 @@
|
||||
#!/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;
|
||||
23
examples/hello-ruby/hello-sync.sh
Executable file
23
examples/hello-ruby/hello-sync.sh
Executable file
@@ -0,0 +1,23 @@
|
||||
#!/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": "sync",
|
||||
"path":"/hello-sync",
|
||||
"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-sync
|
||||
done;
|
||||
Reference in New Issue
Block a user