def runserver(): print (route.get_routes()) application = tornado.web.Application(route.get_routes()+[ ], **{ 'model': model.Model(setting.mongo_uri, 50, setting.mongo_database), 'debug': setting.debug }) application.listen(setting.listen_port, setting.listen_host) tornado.ioloop.IOLoop.instance().start()
def runserver(): print(route.get_routes()) application = tornado.web.Application( route.get_routes() + [], **{ 'model': model.Model(setting.mongo_uri, 50, setting.mongo_database), 'debug': setting.debug }) application.listen(setting.listen_port, setting.listen_host) tornado.ioloop.IOLoop.instance().start()
def runserver(): print route.get_routes() application = tornado.web.Application( route.get_routes() + [ (r"/main", MainHandler), (r"/second", SecondHandler), # (r"/third", handler.ThirdHandler) ], **{ 'model': model.Model(setting.mongo_uri, 50, setting.mongo_database), 'debug': setting.debug }) # if hasattr(setting, 'ssl_options'): # application.listen(setting.listen_port, setting.listen_host, ssl_options=setting.ssl_options) # else: # application.listen(setting.listen_port, setting.listen_host) application.listen(setting.listen_port, setting.listen_host) # tornado.ioloop.IOLoop.current().start() tornado.ioloop.IOLoop.instance().start()
def runserver(): print route.get_routes() application = tornado.web.Application(route.get_routes()+[ (r"/main", MainHandler), (r"/second", SecondHandler), # (r"/third", handler.ThirdHandler) ], **{ 'model': model.Model(setting.mongo_uri, 50, setting.mongo_database), 'debug': setting.debug }) # if hasattr(setting, 'ssl_options'): # application.listen(setting.listen_port, setting.listen_host, ssl_options=setting.ssl_options) # else: # application.listen(setting.listen_port, setting.listen_host) application.listen(setting.listen_port, setting.listen_host) # tornado.ioloop.IOLoop.current().start() tornado.ioloop.IOLoop.instance().start()