-
-
Notifications
You must be signed in to change notification settings - Fork 3
Expand file tree
/
Copy pathapplication.wsgi
More file actions
40 lines (28 loc) · 1.02 KB
/
application.wsgi
File metadata and controls
40 lines (28 loc) · 1.02 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
#!/usr/bin/env python3
#
# Copyright (c) 2020 Gareth Palmer <gareth.palmer3@gmail.com>
# This program is free software, distributed under the terms of
# the GNU General Public License Version 2.
from flask import Flask, Response
import authentication
import information
import services
import directory
import quality_report
import problem_report
application = Flask(__name__)
application.config.from_envvar('FLASK_CONFIG', silent = True)
application.register_blueprint(authentication.blueprint)
application.register_blueprint(information.blueprint)
application.register_blueprint(services.blueprint)
application.register_blueprint(directory.blueprint)
application.register_blueprint(quality_report.blueprint)
application.register_blueprint(problem_report.blueprint)
@application.route('/')
def index():
return Response('', mimetype = 'text/plain'), 200
@application.errorhandler(Exception)
def error_handler(error):
return Response(str(error), mimetype = 'text/plain'), 500
if __name__ == '__main__':
application.run()