def main():
base_dir = os.path.dirname(__file__)
settings = {
"cookie_secret": config.settings.board['cookie_secret'],
"template_path":os.path.join(base_dir,"template"),
"static_path":os.path.join(base_dir,"static"),
"thumbnail_path":os.path.join(base_dir,"thumbnail"),
"debug":True,
"xsrf_cookies":True,
}
application = tornado.web.Application([
tornado.web.url(r"/",MainHandler,name="main"),
tornado.web.url(r"/db_schedule",Get_DB_Data),
],**settings)
http_server = tornado.httpserver.HTTPServer(application)
http_server.listen(options.port)
tornado.ioloop.IOLoop.instance().start()
评论列表
文章目录