Custom app_index.html with bokeh serve apps

It took me a while to figure out that when serving multiple bokeh applications using, for example:
bokeh serve src/app1/ src/app2/ --index=template_name.html
the template_name.html should be the absolute path, so in order to make it work the command should be:
bokeh serve src/app1/ src/app2/ --index=/absolute/path/to/template.html

Is this the only way to do it while still using bokeh serve?
I have the feeling that there is a more straightforward way that I am missing.

my directory structure is:

   |    +---app1
   |    |       +---templates
   |    |       |       +---index.html
   |    |
   |    +---app2
   |    |       +---templates
   |    |       |       +---index.html
   |    |
   |    +---app_index.html

I have the applications running on heroku for the moment, so, in this case my Procfile is:
web: bokeh serve --port=$PORT --address= --use-xheaders src/app1 src/app2 --index=/app/static/app_index.html

Bokeh just passes the value you provide to Tornado directly as-is in a route specification, so it’s really about what Tornado expects or can use. I don’t happen to know offhand. Assuming you are executing bokeh serve in the project directory, I would have tried --index static/app_index.html (i.e. the relative path from the current working directory of the process). But if that does not work then absolute path is probably the only option.

This topic was automatically closed 90 days after the last reply. New replies are no longer allowed.