Sorry in advance if any of what I say sounds dumb, I don’t have any experience working with servers in any capacity.
I’m having trouble deploying a bokeh server on my local IP address that allows multiple users to use it (who are on the same network) at the same time. I’m using Flask and based it off the flask example on github. I’m trying to allow multiple users to use the application off the link “IP:5001,” where I’m referring to my IP address as IP here for security purposes. It allows a user to use it who is not me but doesn’t allow multiple users to use at the same time. I would’ve thought to increase the number of processes beyond 1 but I’m on a windows machine so was looking for some help on how to do this because I’m such a newbie with this stuff. I tried to use the gunicorn example but I’m on anaconda and there were no anaconda repositories for asyncio that work in Windows 64 bit. Thanks so much in advance for any help.
The basic code is as follows:
app = Flask(__name__, static_url_path='/static')
def bkapp(doc):
doc.add_root(tabs)
@app.route('/', methods=['GET'])
def bkapp_page():
script = server_document('http://IP:5006/bkapp')
return render_template("embed.html", script=script, template="Flask")
def bk_worker():
server = Server({'/bkapp': bkapp}, io_loop=IOLoop(), allow_websocket_origin=["IP:5001"])
server.start()
server.io_loop.start()
Thread(target=bk_worker).start()
if __name__ == '__main__':
app.run(port=5001, host='IP')
