Mercurial > hg > CommitWatcher
comparison commitwatcher/web/app.py @ 27:4568da225eac
moving stuff aoud
author | Jeff Hammel <jhammel@mozilla.com> |
---|---|
date | Fri, 04 Oct 2013 10:28:56 -0700 |
parents | commitwatcher/web.py@a5b4025f2455 |
children | f82331d875f0 |
comparison
equal
deleted
inserted
replaced
26:6ac606ca9ba5 | 27:4568da225eac |
---|---|
1 #!/usr/bin/env python | |
2 | |
3 """ | |
4 web handler for CommitWatcher | |
5 """ | |
6 | |
7 from webob import Request, Response, exc | |
8 | |
9 class Handler(object): | |
10 | |
11 def __init__(self, repository, **kw): | |
12 self.repository = repository | |
13 | |
14 def __call__(self, environ, start_response): | |
15 request = Request(environ) | |
16 response = Response(content_type='text/plain', | |
17 body="CommitWatcher") | |
18 return response(environ, start_response) | |
19 | |
20 if __name__ == '__main__': | |
21 from wsgiref import simple_server | |
22 app = Handler() | |
23 server = simple_server.make_server(host='0.0.0.0', port=8080, app=app) | |
24 server.serve_forever() |