Factory function that creates a new `CoolmagicApplication` object. Optional WSGI middlewares should be applied here.
(config=None)
| 59 | |
| 60 | |
| 61 | def make_app(config=None): |
| 62 | """ |
| 63 | Factory function that creates a new `CoolmagicApplication` |
| 64 | object. Optional WSGI middlewares should be applied here. |
| 65 | """ |
| 66 | config = config or {} |
| 67 | app = CoolMagicApplication(config) |
| 68 | |
| 69 | # static stuff |
| 70 | app = SharedDataMiddleware( |
| 71 | app, {"/public": path.join(path.dirname(__file__), "public")} |
| 72 | ) |
| 73 | |
| 74 | # clean up locals |
| 75 | app = local_manager.make_middleware(app) |
| 76 | |
| 77 | return app |
no test coverage detected