Mercurial > hg > CommitWatcher
view commitwatcher/web/app.py @ 33:9a76064ea527
stub
author | Jeff Hammel <jhammel@mozilla.com> |
---|---|
date | Sun, 13 Oct 2013 19:08:46 -0700 |
parents | f82331d875f0 |
children |
line wrap: on
line source
#!/usr/bin/env python """ web handler for CommitWatcher """ import os from webob import Request, Response, exc here = os.path.dirname(os.path.abspath(__file__)) class MercurialFeedServer(object): """serves file + directory feeds for an hg repo""" def __init__(self, repository, **kw): self.repository = repository def __call__(self, environ, start_response): request = Request(environ) response = Response(content_type='text/plain', body="CommitWatcher") return response(environ, start_response) def main(args=sys.argv[1:]): """serve WSGI app""" from wsgiref import simple_server app = Handler() server = simple_server.make_server(host='0.0.0.0', port=8080, app=app) server.serve_forever() if __name__ == '__main__': main()