Skip to content

Commit 13100c9

Browse files
committed
Allow configure without running for uWSGI.
1 parent 4298752 commit 13100c9

File tree

6 files changed

+29
-5
lines changed

6 files changed

+29
-5
lines changed

app/ch15_deploy/starter/.idea/.name

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

app/ch15_deploy/starter/.idea/flask-testing.iml renamed to app/ch15_deploy/starter/.idea/flask-deploy.iml

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

app/ch15_deploy/starter/.idea/inspectionProfiles/Project_Default.xml

Lines changed: 17 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

app/ch15_deploy/starter/.idea/misc.xml

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

app/ch15_deploy/starter/.idea/modules.xml

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

app/ch15_deploy/starter/pypi_org/app.py

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@
22
import sys
33

44
import flask
5+
56
folder = os.path.abspath(os.path.join(os.path.dirname(__file__), '..'))
67
sys.path.insert(0, folder)
78
import pypi_org.data.db_session as db_session
@@ -10,9 +11,13 @@
1011

1112

1213
def main():
14+
configure()
15+
app.run(debug=True, port=5006)
16+
17+
18+
def configure():
1319
register_blueprints()
1420
setup_db()
15-
app.run(debug=True, port=5006)
1621

1722

1823
def setup_db():
@@ -40,3 +45,5 @@ def register_blueprints():
4045

4146
if __name__ == '__main__':
4247
main()
48+
else:
49+
configure()

0 commit comments

Comments
 (0)