| OLD | NEW |
| 1 # Copyright 2014 The LUCI Authors. All rights reserved. | 1 # Copyright 2014 The LUCI Authors. All rights reserved. |
| 2 # Use of this source code is governed by the Apache v2.0 license that can be | 2 # Use of this source code is governed under the Apache License, Version 2.0 |
| 3 # found in the LICENSE file. | 3 # that can be found in the LICENSE file. |
| 4 | 4 |
| 5 """WSGI app with API, UI and task queue endpoints. | 5 """WSGI app with API, UI and task queue endpoints. |
| 6 | 6 |
| 7 Used when 'ereporter2' component is included via app.yaml includes. If app has | 7 Used when 'ereporter2' component is included via app.yaml includes. If app has |
| 8 a backend module, it must be included there too. | 8 a backend module, it must be included there too. |
| 9 """ | 9 """ |
| 10 | 10 |
| 11 import webapp2 | 11 import webapp2 |
| 12 | 12 |
| 13 from components import utils | 13 from components import utils |
| 14 | 14 |
| 15 from . import handlers | 15 from . import handlers |
| 16 from . import ui | 16 from . import ui |
| 17 | 17 |
| 18 | 18 |
| 19 def create_wsgi_application(): | 19 def create_wsgi_application(): |
| 20 ui.configure() | 20 ui.configure() |
| 21 routes = [] | 21 routes = [] |
| 22 routes.extend(handlers.get_frontend_routes()) | 22 routes.extend(handlers.get_frontend_routes()) |
| 23 routes.extend(handlers.get_backend_routes()) | 23 routes.extend(handlers.get_backend_routes()) |
| 24 return webapp2.WSGIApplication(routes, debug=utils.is_local_dev_server()) | 24 return webapp2.WSGIApplication(routes, debug=utils.is_local_dev_server()) |
| 25 | 25 |
| 26 | 26 |
| 27 APP = create_wsgi_application() | 27 APP = create_wsgi_application() |
| OLD | NEW |