Mercurial > hg > CommitWatcher
changeset 28:f82331d875f0
wip
author | Jeff Hammel <jhammel@mozilla.com> |
---|---|
date | Sat, 05 Oct 2013 15:38:32 -0700 |
parents | 4568da225eac |
children | 826155711744 |
files | commitwatcher/web/app.py |
diffstat | 1 files changed, 11 insertions(+), 2 deletions(-) [+] |
line wrap: on
line diff
--- a/commitwatcher/web/app.py Fri Oct 04 10:28:56 2013 -0700 +++ b/commitwatcher/web/app.py Sat Oct 05 15:38:32 2013 -0700 @@ -4,9 +4,13 @@ web handler for CommitWatcher """ +import os from webob import Request, Response, exc -class Handler(object): +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 @@ -17,8 +21,13 @@ body="CommitWatcher") return response(environ, start_response) -if __name__ == '__main__': + +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()