view piecrust/wsgiutil/__init__.py @ 570:7dabfdd056a1

serve: Fix corner cases where the pipeline doesn't run correctly. * When `chef serve` is run before the `assets` folder is created, monitor that folder suddenly appearing and rebuild the pipeline. * Do the same when the `config.yml` file has changed.
author Ludovic Chabant <ludovic@chabant.com>
date Sat, 31 Oct 2015 00:03:32 -0700
parents cc6f3dbe3048
children 81d9c3a3a0b5
line wrap: on
line source

from piecrust.serving.server import WsgiServer


def get_app(root_dir, sub_cache_dir='prod', enable_debug_info=False):
    app = WsgiServer(root_dir,
                     sub_cache_dir=sub_cache_dir,
                     enable_debug_info=enable_debug_info)
    return app