app.py 文件源码

python
阅读 19 收藏 0 点赞 0 评论 0

项目:slash-onenight 作者: marksteve 项目源码 文件源码
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()
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号