Ejemplo n.º 1
0
def main():
    logger.debug("router begining...")
    while True:
        router = Router()
        router.run()
        time.sleep(5)
    logger.debug("router end.")
    os._exit(0)  # fix :there are threads, not exit properly
Ejemplo n.º 2
0
from flask import Flask
from core.router import Router
from flask_cors import CORS, cross_origin

app = Flask(__name__)
cors = CORS(app, resources={r"/api/*": {"origins": "*"}})
Router.run(app)