Permalink
Switch branches/tags
Nothing to show
Find file Copy path
Fetching contributors…
Cannot retrieve contributors at this time
executable file 26 lines (19 sloc) 519 Bytes
#!/usr/bin/env python3
import os
import cherrypy
import sys
PATH = os.path.abspath(sys.argv[1])
class Root(object):
pass
cherrypy.server.socket_port = 8000
cherrypy.server.socket_host = '::'
cherrypy.config.update({'environment': 'production'})
# just serve everything from given directory (first command line arg)
config = {
'/': {
'tools.staticdir.on': True,
'tools.staticdir.dir': PATH,
'tools.staticdir.index': 'index.html',
},
}
cherrypy.quickstart(Root(), config=config)