Add standalone run.sh and configure localhost
This commit is contained in:
parent
5cc99949fd
commit
12c58b70fa
4 changed files with 24 additions and 3 deletions
|
|
@ -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/';
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -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('.'));
|
||||
});
|
||||
|
|
|
|||
15
resources/standalone/run.sh
Normal file
15
resources/standalone/run.sh
Normal file
|
|
@ -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/
|
||||
4
resources/standalone/segments4/.gitignore
vendored
Normal file
4
resources/standalone/segments4/.gitignore
vendored
Normal file
|
|
@ -0,0 +1,4 @@
|
|||
# Ignore everything in this directory
|
||||
*
|
||||
# Except this file
|
||||
!.gitignore
|
||||
Loading…
Add table
Add a link
Reference in a new issue