Handle cmdline args in the nodejs script
This commit is contained in:
parent
35baae988e
commit
14893faffe
|
@ -47,5 +47,9 @@ function runWebServer(r) {
|
|||
if (process.env.R2PIPE_IN) {
|
||||
var r = r2p.rlangpipe(runWebServer);
|
||||
} else {
|
||||
var r = r2p.pipe ("/bin/ls", runWebServer);
|
||||
var targetfile = "/bin/ls";
|
||||
if (process.argv.length>2) {
|
||||
targetfile = process.argv[2];
|
||||
}
|
||||
var r = r2p.pipe (targetfile, runWebServer);
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue