def main():
parse_command_line()
redis.connect(host=options.redis_host)
app = tornado.web.Application(
[
(r'/', MainHandler),
(r'/oauth', OAuthHandler),
(r'/command', CommandHandler),
(r'/button', ButtonHandler),
],
template_path=os.path.join(os.path.dirname(__file__), 'templates'),
static_path=os.path.join(os.path.dirname(__file__), 'static'),
debug=options.debug,
)
app.listen(options.port)
ioloop = tornado.ioloop.IOLoop.current()
ioloop.start()
评论列表
文章目录