Background
系统: 服务器(Lighttpd + Django + rest_framework + corsheaders + REST(应用名字) + Websocket )+ Linux 嵌入式文件系统
REST load
REST is NOT running until you actually load the one of the URI firstly, because when lighttpd launches the handler, it does not create REST until someone actually asks for it. so need to get REST API first.
Websocket
Because Websocket Server is started in myGlobal.py, you need to load a REST URI first, that will then cause myGlobal.py to load (and then websocket server).
If you don’t visit REST URI first, then the server will not be started.