view piecrust/wsgiutil/cwdapp.py @ 377:b45322924d18

tests: Fix serving unit-tests.
author Ludovic Chabant <ludovic@chabant.com>
date Fri, 08 May 2015 09:16:12 -0700
parents 21687b933193
children fe8a58817088
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()