diff --git a/config.template.js b/config.template.js index 4cead99..18510c0 100644 --- a/config.template.js +++ b/config.template.js @@ -20,13 +20,13 @@ } else { // desktop configuration - BR.conf.host = 'http://0.0.0.0:17777'; + BR.conf.host = 'http://localhost:17777'; // Pre-loading selected profile disabled locally. Needs brouter-web to run on a // local web server with the profiles in a subdirectory or allowing file access // in the Browser (security!), see // https://github.com/mrdoob/three.js/wiki/How-to-run-things-locally - //BR.conf.profilesUrl = 'http://localhost:8000/profiles2/'; + BR.conf.profilesUrl = 'http://localhost:8000/profiles2/'; //BR.conf.profilesUrl = 'file://YOUR_PATH_TO/profiles2/'; } diff --git a/gulpfile.js b/gulpfile.js index e6a479b..c7bced2 100644 --- a/gulpfile.js +++ b/gulpfile.js @@ -365,6 +365,8 @@ gulp.task('release:zip_standalone', function() { }) ); + var root = gulp.src(['resources/standalone/run.sh', 'resources/standalone/segments4']); + var serverRoot = gulp .src( [ @@ -402,7 +404,7 @@ gulp.task('release:zip_standalone', function() { base: '../brouter/misc/scripts/' }); - return merge(brouterWeb, serverRoot, serverProfiles, serverScripts) + return merge(brouterWeb, root, serverRoot, serverProfiles, serverScripts) .pipe(zip(destName)) .pipe(gulp.dest('.')); }); diff --git a/resources/standalone/run.sh b/resources/standalone/run.sh new file mode 100644 index 0000000..8938b1c --- /dev/null +++ b/resources/standalone/run.sh @@ -0,0 +1,15 @@ +#!/bin/sh + +cd "$(dirname "$0")" + +# start script for standalone zip + +# start BRouter server on localhost +x-terminal-emulator -T "BRouter server" -e "./standalone/local.sh" + +# start HTTP server for current directory (for brouter-web and profiles) +#x-terminal-emulator -T "BRouter-Web HTTP server" -e "python -m SimpleHTTPServer 8000" +x-terminal-emulator -T "BRouter-Web HTTP server" -e "python3 -m http.server 8000 --bind localhost" + +# open BRouter-Web in default browser +xdg-open http://localhost:8000/brouter-web/ diff --git a/resources/standalone/segments4/.gitignore b/resources/standalone/segments4/.gitignore new file mode 100644 index 0000000..5e7d273 --- /dev/null +++ b/resources/standalone/segments4/.gitignore @@ -0,0 +1,4 @@ +# Ignore everything in this directory +* +# Except this file +!.gitignore