Skip to content

Commit e3f8db1

Browse files
committed
Renamed proxy service 'iris' => 'proxy'.
`iris open` now configurable.
1 parent 6316b34 commit e3f8db1

File tree

2 files changed

+22
-9
lines changed

2 files changed

+22
-9
lines changed

conf/services-sample.json

+11-5
Original file line numberDiff line numberDiff line change
@@ -3,18 +3,24 @@
33
"hostname" : "0.0.0.0"
44
},
55
"endpoints": {
6-
"iris" : {
7-
"examples" : { "paths" : [ "/gwas", "/phenotypes", "/species", "/pcoords" ] }
6+
"proxy" : {
7+
"examples" : {
8+
"paths" : [ "/gwas", "/phenotypes", "/species", "/pcoords" ]
9+
}
810
},
911
"examples" : {
10-
"examples-fastbit" : { "type": "fastbit", "paths" : [ "/gwas", "/pcoords" ] },
11-
"examples-mongo" : { "type": "mongo", "paths" : [ "/phenotypes" ] }
12+
"examples-fastbit" : {
13+
"type": "fastbit", "paths" : [ "/gwas", "/pcoords" ]
14+
},
15+
"examples-mongo" : {
16+
"type": "mongo", "paths" : [ "/phenotypes" ]
17+
}
1218
}
1319
},
1420
"services": [
1521
{
1622
"config": "app-config.js",
17-
"name": "iris",
23+
"name": "proxy",
1824
"nodefile": "proxy.js",
1925
"port": 4747
2026
},

scripts/iris

+11-4
Original file line numberDiff line numberDiff line change
@@ -355,13 +355,20 @@ HELP
355355
# ---------------------------------------------------------------------------
356356
# IRIS OPEN
357357
# ---------------------------------------------------------------------------
358-
_help_open="iris open
358+
_help_open="iris open [<service>]
359359
360360
Opens a browser window with the Iris website. This option is currently only
361-
supported by Mac (Srsly, why would you use anything else?)."
361+
supported by Mac (Srsly, why would you use anything else?).
362+
363+
<service> The web service to open in a browser (default: 'proxy')"
362364
function iris_cmd_open {
363-
proxy_service='iris' # TODO: Name it something else?
364-
local service=`iris_cmd_services $proxy_service`
365+
local svc=$1
366+
test -z "svc" && svc='proxy'
367+
local service=`iris_cmd_services $svc`
368+
if [ -z "$service" ]; then
369+
echo "No such service to open ('$svc')!"
370+
exit 1
371+
fi
365372
open `_service_url $service`
366373
}
367374

0 commit comments

Comments
 (0)