OLD | NEW |
1 # Copyright 2015 The LUCI Authors. All rights reserved. | 1 # Copyright 2015 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 import os | 5 import os |
6 import sys | 6 import sys |
7 | 7 |
8 APP_DIR = os.path.dirname(os.path.abspath(__file__)) | 8 APP_DIR = os.path.dirname(os.path.abspath(__file__)) |
9 sys.path.insert(0, os.path.join(APP_DIR, 'components', 'third_party')) | 9 sys.path.insert(0, os.path.join(APP_DIR, 'components', 'third_party')) |
10 | 10 |
11 import endpoints | 11 import endpoints |
12 import webapp2 | 12 import webapp2 |
13 | 13 |
(...skipping 32 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
46 """Returns WSGI app for backend.""" | 46 """Returns WSGI app for backend.""" |
47 bootstrap_templates() | 47 bootstrap_templates() |
48 return webapp2.WSGIApplication( | 48 return webapp2.WSGIApplication( |
49 handlers.get_backend_routes(), debug=utils.is_local_dev_server()) | 49 handlers.get_backend_routes(), debug=utils.is_local_dev_server()) |
50 | 50 |
51 | 51 |
52 def initialize(): # pragma: no cover | 52 def initialize(): # pragma: no cover |
53 """Bootstraps the global state and creates WSGI applications.""" | 53 """Bootstraps the global state and creates WSGI applications.""" |
54 ereporter2.register_formatter() | 54 ereporter2.register_formatter() |
55 return create_html_app(), create_endpoints_app(), create_backend_app() | 55 return create_html_app(), create_endpoints_app(), create_backend_app() |
OLD | NEW |