server.py 文件源码

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

项目:rheostatic 作者: waylan 项目源码 文件源码
def serve(address, root, **kwargs):                     # pragma: no cover
    """ Serve static files from root directory. """

    app = Rheostatic(root, **kwargs)

    server = make_server(address[0], address[1], validator(app))

    try:
        print('Starting server at http://%s:%d/...' % address)
        print('Serving files from %s' % app.root)
        print('Press ctrl+c to stop.')
        server.serve_forever()
    except KeyboardInterrupt:
        print('Quiting...')
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号