马上注册,结交更多好友,享用更多功能,让你轻松玩转社区。
您需要 登录 才可以下载或查看,没有账号?立即注册
x
不晓得怎样部署到Github Pages
import os
import cherrypy
PATH = os.path.abspath(os.path.dirname(__file__))
class Root(object): pass
cherrypy.tree.mount(Root(), '/', config={
'/': {
'tools.staticdir.on': True,
'tools.staticdir.dir': PATH,
'tools.staticdir.index': 'index.html',
},
})
cherrypy.quickstart() |