Simple Linux Panel
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
mdserver-web/app.py

24 lines
517 B

7 years ago
# coding:utf-8
7 years ago
import sys
import io
import os
6 years ago
from route import app, socketio
7 years ago
3 years ago
from gevent import monkey
monkey.patch_all()
4 years ago
from gevent.pywsgi import WSGIServer
from geventwebsocket.handler import WebSocketHandler
7 years ago
try:
if __name__ == "__main__":
6 years ago
PORT = 7200
HOST = '0.0.0.0'
4 years ago
http_server = WSGIServer(
(HOST, PORT), app, handler_class=WebSocketHandler)
http_server.serve_forever()
6 years ago
socketio.run(app, host=HOST, port=PORT)
7 years ago
except Exception as ex:
4 years ago
print(ex)