You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
fromcontextlibimportcontextmanagerfrombokeh.server.serverimportServer@contextmanagerdefcall_server(bkapp):
server=Server({"/": bkapp})
try:
server.start()
yieldserverexceptKeyboardInterrupt:
passfinally:
passdefbokeh_app_wrapper(**kwargs):
# setup settings before creating the app heredefbokeh_app(doc):
# now you can use previously defined settings# add items to `doc`doc.add_root(...)
returnbokeh_appdefapp(**kwargs):
# e.g. data handlingreturnbokeh_app_wrapper(**kwargs)
defmain(**kwargs):
withcall_server(app(**kwargs)) asapp_server:
app_server.io_loop.add_callback(app_server.show, "/")
app_server.io_loop.start()
App layer could be skipped if there is no need to handle anything there.
The text was updated successfully, but these errors were encountered:
Start server without
bokeh serve
https://stackoverflow.com/questions/54069272/how-to-run-a-bokeh-server-without-bokeh-server-show-command
e.g. this can be wrapped as
App layer could be skipped if there is no need to handle anything there.
The text was updated successfully, but these errors were encountered: