# HG changeset patch # User Jeff Hammel # Date 1330387963 28800 # Node ID f5360bb59e418698ba4fc67d13661ed94030279e # Parent b03602153de2cecf8d867631ebabbfe058204549 this now serves diff -r b03602153de2 -r f5360bb59e41 simpypi/factory.py --- a/simpypi/factory.py Mon Feb 27 16:05:34 2012 -0800 +++ b/simpypi/factory.py Mon Feb 27 16:12:43 2012 -0800 @@ -22,7 +22,7 @@ def factory(**app_conf): """create a webob view and wrap it in middleware""" app = Dispatcher(**app_conf) - return HTTPExceptionHandler(PassthroughFileserver(app, resource_filename(__name__, 'static'))) + return PassthroughFileserver(app, resource_filename(__name__, 'static')) if __name__ == '__main__': import shutil @@ -30,6 +30,8 @@ from wsgiref import simple_server tempdir = tempfile.mkdtemp() try: - app = factory + app = factory(directory=tempdir) + server = simple_server.make_server(host='0.0.0.0', port=8080, app=app) + server.serve_forever() finally: shutil.rmtree(tempdir)