I have the following question:
How can you set the standard static directory of the Bokeh server when using a customized Bokeh app?
I have sub-classed a Bokeh handler class, so that I can;
Start Bokeh server via python code
Give the server a function to modify the server document
Manually set the template
Manually set the static directory
The main reasons I have done this are;
I want to be able to start the code from a run all script
I want to be able to reuse code that lives outside my Bokeh dashboard module
When I set the static directory manually, the standard static directory is overwritten. The server is no longer able to find the Bokeh css and js files. As a work around I have to manually place the js and css files in the customized static directory.
When starting a standard Bokeh directory structure (main.py, /static/, /templates/, …) with the command line ‘bokeh serve --show “name”’ the static directory is added to the server, together with the standard static directory. When starting the same app manually the static directory is overwritten by the new one, the Bokeh css and js can no longer be found.
app = Application(DirectoryHandler())
server = Server(app)
This gives a standard 404 on all the Bokeh css and js files.
I think that the bokeh serve command sets the standard static directory and then adds the app static directory. Does anybody know if this can be done manually as well?