The flask example in from github allowed me to run a flask application. This works great for a simple application, but I cannot connect the static folder. The templates folder, however does connect and I am able to use the render_template function.
For instance, my application runs at myurl.com/services/myapp but it cannot retrieve files in the static directory. Help in loading these static files would be greatly appreciated.
Unfortunately your post is a bit short, so it’s difficult for people to work out what issue might be. Could you post more information, ideally a full example so someone can reproduce your problem from scratch on their own system?
Sure. I’m trying to create a completely separate public web site from JuptyerHub. As in, I’d like anyone to be able to access myurl.com/separate_site. If there is a simpler way that using a “Service”, I’d be interested in that.
I successfully followed the Flask example from the JupyterHub github directory linked in the original post. I placed the web application folder in the /opt/JupyterHub/etc/JupyterHub directory which also contains the jupyterhub_congig.py file. Here is the file system breakdown.
certificates
__init__.py
static
cert.png
templates
cert.html
Issue
The files from the static folder are unable to be linked in the app. The cert.png file does not show up in the app. When I run a normal flask app (not on top of JupyterHub, the same configuration works).