Permalink
Browse files

super simple pyramid app

  • Loading branch information...
0 parents commit 3f94ce83ae722a2a1d56392821f167cc6e17689f @jpetazzo committed Oct 6, 2011
Showing with 20 additions and 0 deletions.
  1. +2 −0 dotcloud.yml
  2. +1 −0 requirements.txt
  3. +17 −0 wsgi.py
@@ -0,0 +1,2 @@
+www:
+ type: python
@@ -0,0 +1 @@
+pyramid
17 wsgi.py
@@ -0,0 +1,17 @@
+from paste.httpserver import serve
+from pyramid.config import Configurator
+from pyramid.response import Response
+
+def dump_environ(request):
+ return Response(
+ body='\n'.join('{0}={1}'.format(k,v)
+ for (k,v) in request.environ.items()),
+ content_type='text/plain')
+
+config = Configurator()
+config.add_route('dump_environ', '/')
+config.add_view(dump_environ, route_name='dump_environ')
+application = config.make_wsgi_app()
+
+if __name__ == '__main__':
+ serve(application, host='0.0.0.0')

0 comments on commit 3f94ce8

Please sign in to comment.