Exemplo n.º 1
0
def main():
    """Entrance Function"""

    tornado_app = web.Application(handlers=routes, **O_O.application)
    tornado_server = httpserver.HTTPServer(tornado_app, **O_O.httpserver)

    tornado_server.listen(O_O.server.port)
    print('start listen...')
    O_O.show()

    ioloop.IOLoop.instance().start()
Exemplo n.º 2
0
def main():
    """Entrance Function"""
    controllers.load_controllers()

    for r in ROUTES:
        print(f'{r[0]:30s} {r[1]}')

    app = web.Application(handlers=ROUTES, **O_O.application)
    app.listen(O_O.server.port, **O_O.httpserver)

    print('\nstart listen...')
    O_O.show()

    ioloop.IOLoop.instance().start()