Mercurial > piecrust2
comparison piecrust/wsgiutil/__init__.py @ 553:cc6f3dbe3048
serve: Extract some of the server's functionality into WSGI middlewares.
author | Ludovic Chabant <ludovic@chabant.com> |
---|---|
date | Sat, 08 Aug 2015 22:01:47 -0700 |
parents | d40b744a9d99 |
children | 81d9c3a3a0b5 |
comparison
equal
deleted
inserted
replaced
552:9612cfc6455a | 553:cc6f3dbe3048 |
---|---|
1 from piecrust.serving.server import Server | 1 from piecrust.serving.server import WsgiServer |
2 | 2 |
3 | 3 |
4 def get_app(root_dir, sub_cache_dir='prod', enable_debug_info=False): | 4 def get_app(root_dir, sub_cache_dir='prod', enable_debug_info=False): |
5 server = Server(root_dir, | 5 app = WsgiServer(root_dir, |
6 sub_cache_dir=sub_cache_dir, | 6 sub_cache_dir=sub_cache_dir, |
7 enable_debug_info=enable_debug_info) | 7 enable_debug_info=enable_debug_info) |
8 app = server.getWsgiApp() | |
9 return app | 8 return app |
10 | 9 |