Skip to content

Commit

Permalink
Test sub-uri deployment
Browse files Browse the repository at this point in the history
  • Loading branch information
cmdcolin committed Jul 10, 2018
1 parent 400b809 commit a434867
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 4 deletions.
2 changes: 2 additions & 0 deletions .travis.yml
Expand Up @@ -73,6 +73,8 @@ script:
cd $BUILD_DIR;
MOZ_HEADLESS=1 SELENIUM_BROWSER=firefox NOSEOPTS="-I jasmine" JBROWSE_URL=http://localhost:9000/JBrowse-$RELEASE_VERSION/index.html tests/selenium_tests/travis_wrapper.sh;
fi
- utils/jb_run.js -p 9000 -s jbrowse & sleep 2
- node_modules/.bin/phantomjs tests/js_tests/run-jasmine.js http://localhost:9000/jbrowse/tests/js_tests/index.html
- set +e
after_failure:
- cat setup.log
Expand Down
8 changes: 4 additions & 4 deletions utils/jb_run.js
Expand Up @@ -18,14 +18,14 @@ if (fs.pathExistsSync(thisPath+"/node_modules/@gmod/jbrowse/utils")) {

// command line options
var getopt = new getopt([
['p' , 'port=NUMBER' , 'listening port'],
['h' , 'help' , 'display this help']
['p', 'port=NUMBER' , 'listening port'],
['s', 'suburi=STRING', 'sub-URI path'],
['h', 'help', 'display this help']
]); // create Getopt instance
getopt.bindHelp(); // bind option 'help' to default action
opt = getopt.parseSystem(); // parse command line

var port = 3000;

var setPort = opt.options['port'];
if (typeof setPort !== 'undefined') {
port = setPort;
Expand All @@ -38,7 +38,7 @@ var dispPort = "";
if (port !== 80) dispPort = ":"+port;


app.use('/', express.static(
app.use('/'+(opt.options['suburi']||''), express.static(
jbrowsePath,
{
// set Content-Encoding: gzip on .jsonz and .gz files
Expand Down

0 comments on commit a434867

Please sign in to comment.