Mercurial > bzezpatch
view dev_server.py @ 14:4ba34e1cf310 default tip
untrusted hg commands now only have 60 seconds to execute.
author | Atul Varma <avarma@mozilla.com> |
---|---|
date | Thu, 03 Jun 2010 11:05:33 -0700 |
parents | 8345b393df5b |
children |
line wrap: on
line source
import os import sys from wsgiref.simple_server import make_server import bzezpatch.app import bzezpatch.hg if __name__ == '__main__': repopath = os.path.expanduser('~/Documents/jetpack-sdk') hg = bzezpatch.hg.Hg(hg='hg', canonical_repo=repopath) public_config = { 'title': 'Jetpack SDK', 'homepage': 'http://jetpack.mozillalabs.com', 'repo': 'http://hg.mozilla.org/labs/jetpack-sdk' } app = bzezpatch.app.App(root_dir=os.getcwd(), hg=hg, public_config=public_config, allow_schemes=('http', 'https', 'file')) httpd = make_server('127.0.0.1', 8000, app) print "serving on port 8000" httpd.serve_forever()