2
votes

How do i start a bokeh server with a file of address that is my whitelist?

I currently launch it using

python -m bokeh server --host x.x.x.x:5006 --host x.x.x.x:5006 --host x.x.x.x:5006 --host x.x.x.x:5006 --host x.x.x.x:5006 --host x.x.x.x:5006 --show myapp

I would like it to be

python -m bokeh server --host whitelist.txt --show myapp
1

1 Answers

2
votes

I guess this feature is still not implemented in the bokeh command line. Some bash language can be used though. Let's say you have the list of addresses and server names in several lines inside a file "whitelist.txt", e.g.

some.servername.com
xxx.xxx.xxx.xxx
some.other.server.com
yyy.yyy.yyy.yyy
...

Then you can start your bokeh server with:

cmd="bokeh serve myapp.py --port XXXX --prefix someprefix";while read line;do cmd+=" --host $line:80"; done <whitelist.txt;eval $cmd

Then you are ready to reach your application in a browser:

http://some.other.server.com/someprefix/myapp.py