0

I want to use flask in jupyter hub.

So when I looked at the relationship between jupyter hub and flask, I found something that I had to set up separately.

https://github.com/jupyterhub/jupyterhub/blob/master/examples/service-whoami-flask/whoami-flask.py

Is there any way to use flask other than this?

For example

I used to use it like this.

app.run(host = "xxx.xx.xxx.xxxx" , port = 12345)

But it didn't work for me, even if it didn't work.

Please help me.

이성령
  • 1,264
  • 3
  • 19
  • 23
  • do you mean jupyter hub on your computer or on exteral server ? On local computer you use `127.0.0.1` or `0.0.0.0`. Do you need access to jupyter hub data ? If not then it should run without all this settings. – furas Aug 15 '19 at 11:34
  • I use jupyter hub on remote server So I use static ip. I try `python3 flask_test.py` But it not turn on the ui and it break `ERR_CONNECTION_TIMED_OUT` Please help me... I use the jupyter notebook Xx.xxx.xx.xx:port/user/xxxx – 이성령 Aug 16 '19 at 01:26
  • if you want to run flask as standalone web page on the server then you have to use IP `0.0.0.0` with port different then uses juputer hub - ie. 5000. It should assign flask to all local Network Cards in server and router should redirect all requests from external IP `xxx.xx.xxx.xxxx:5000` to flask on port `5000`. Problem can be if router restricts ports and it doesn't redirect some of them to server - you may not have access to router to change it. – furas Aug 19 '19 at 01:13

0 Answers0