We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 5088f89 commit c728234Copy full SHA for c728234
app/ch15_deploy/final/pypi_org/app.py
@@ -2,6 +2,7 @@
2
import sys
3
4
import flask
5
+
6
folder = os.path.abspath(os.path.join(os.path.dirname(__file__), '..'))
7
sys.path.insert(0, folder)
8
import pypi_org.data.db_session as db_session
@@ -10,9 +11,19 @@
10
11
12
13
def main():
14
+ configure()
15
+ app.run(debug=True, port=5006)
16
17
18
+def configure():
19
+ print("Configuring Flask app:")
20
21
register_blueprints()
22
+ print("Registered blueprints")
23
24
setup_db()
- app.run(debug=True, port=5006)
25
+ print("DB setup completed.")
26
+ print("", flush=True)
27
28
29
def setup_db():
@@ -40,3 +51,5 @@ def register_blueprints():
40
51
41
52
if __name__ == '__main__':
42
53
main()
54
+else:
55
0 commit comments