Example #1
0
from gevent import monkey

monkey.patch_all()

from gevent.pywsgi import WSGIServer
from geventwebsocket.handler import WebSocketHandler
from flask import Flask
import project_blueprints

from threading import Thread

from timing_task import timing_task
import time

app = project_blueprints.bind_blueprints(Flask(__name__, static_folder="", static_url_path=None))
app.url_map.default_subdomain = ''
app.config.update({
    'SERVER_NAME': 'rapi.link',
    'DEBUG': 'True'
})
app.debug = True

print(app.url_map)

http_server = WSGIServer(('10.0.0.233', 8866), app, handler_class=WebSocketHandler)


def start():
    http_server.serve_forever()

Example #2
0
from flask import Flask
import project_blueprints

app = project_blueprints.bind_blueprints(Flask(__name__))
app.config.update({
    'SERVER_NAME': 'artrix.tech'
})

app.run(host="45.76.102.168", port=80)
# app.run(host="127.0.0.1", port=80)