Mercurial > piecrust2
view piecrust/wsgiutil/cwdapp.py @ 378:fe8a58817088
serve: Compatibility with `mod_wsgi`.
author | Ludovic Chabant <ludovic@chabant.com> |
---|---|
date | Sat, 09 May 2015 08:37:32 -0700 |
parents | 21687b933193 |
children | d40b744a9d99 |
line wrap: on
line source
# This is a utility module that can be used with any WSGI-compatible server # like Werkzeug or Gunicorn. It returns a WSGI app for serving a PieCrust # website located in the current working directory. import os from piecrust.serving.server import Server root_dir = os.getcwd() server = Server(root_dir, sub_cache_dir='prod', enable_debug_info=False) app = server.getWsgiApp() # Add this for `mod_wsgi`. application = app