def main(args):
import logging
if args.verbose:
LOGGER.setLevel(logging.DEBUG)
else:
LOGGER.setLevel(logging.INFO)
db = Database(args.db)
root = RootView(db, args.filter)
root.putChild('static', static.File("./static"))
site = server.Site(root)
LOGGER.info("Listening on http://localhost:%d" % args.port)
reactor.listenTCP(args.port, site)
reactor.run()
评论列表
文章目录