Hi,
I am trying to adapt the bokeh + data shader app packaged with
datashader-examples to a custom implementation.
The app needs to run alongside some other apps I have that are run
in “directory” format because they have to be wrapped in a bunch of custom
HTML and CSS, which is most convenient in the directory form, e.g.:
bokeh serve —show dashboard
However, the dashboard example as given uses a tornado server (relevant code below):
python dashboard.py
and I cannot see how this could be adapted to directory form, especially since
the example uses the server itself to serve the datashader layer.
So, is it even possible to adapt this example to a standalone server / directory
implementation? Or should I be attempting to incorporate my custom HTML / css
formatting in a different fashion?
Thanks
JT
if name == ‘main’:
def add_roots(doc):
model = AppState(False) # argument = "outofcore" = False by default
view = AppView(model)
GetDataset.model = model # GetDataset.model has type "AppState"
curdoc().add_root(view.layout) # view.layout has type "Row"
app = Application(FunctionHandler(add_roots))
io_loop = IOLoop.current()
server = Server({'/': app}, io_loop=io_loop, extra_patterns=[('/datashader', GetDataset)], port=5006)
server.start()
io_loop.add_callback(server.show, "/")
io_loop.start()