thrill
thrill copied to clipboard
stream option in config could not be false ?
my code(file: totoro.js):
var thrillRunner = require('thrill').runner
var cfg = {
stream:false,
host:"localhost:9200",
run:'../../other/deck.js/test/index.html'
}
thrillRunner(cfg, function(passed){
if(passed instanceof Error){
throw passed;
}
if(passed){
process.exit(0);
} else {
process.exit(1);
}
})
then i run:
node totoro.js
and i get this error:
fs.js:338
return binding.open(pathModule._makeLong(path), stringToFlags(flags), mode);
^
Error: ENOENT, no such file or directory '/Users/fool2fish/Projects/other/deck.js/test/index.html?disableStream=true'
at Object.fs.openSync (fs.js:338:18)
...
at Protocol._parse
if i set stream option to be true, it is ok.
and an extra question: why this option is not avilable in command line?
It looks like the ordering of the script is off, the disable stream routine gets run (and modifies the run file path) before the automatic root directory finder gets a chance to set the serve directory. This is a bug. The work around is to manually specify the root serve directory:
var cfg = {
stream:false,
host:"localhost:9200",
serve: "../../other/deck.js/test/",
run:'index.html'
}
The stream option was a last minute thing, and I forgot to add it to the commandline options, I'll add it in with the next release.