comparison commitwatcher/web.py @ 25:a5b4025f2455

commitwatcher/web.py
author Jeff Hammel <jhammel@mozilla.com>
date Wed, 02 Oct 2013 18:41:59 -0700
parents bdc039cb1f2e
children
comparison
equal deleted inserted replaced
24:60a67934c64e 25:a5b4025f2455
6 6
7 from webob import Request, Response, exc 7 from webob import Request, Response, exc
8 8
9 class Handler(object): 9 class Handler(object):
10 10
11 def __init__(self, **kw): 11 def __init__(self, repository, **kw):
12 pass 12 self.repository = repository
13 13
14 def __call__(self, environ, start_response): 14 def __call__(self, environ, start_response):
15 request = Request(environ) 15 request = Request(environ)
16 response = Response(content_type='text/plain', 16 response = Response(content_type='text/plain',
17 body="CommitWatcher") 17 body="CommitWatcher")
20 if __name__ == '__main__': 20 if __name__ == '__main__':
21 from wsgiref import simple_server 21 from wsgiref import simple_server
22 app = Handler() 22 app = Handler()
23 server = simple_server.make_server(host='0.0.0.0', port=8080, app=app) 23 server = simple_server.make_server(host='0.0.0.0', port=8080, app=app)
24 server.serve_forever() 24 server.serve_forever()
25
26