Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Open sidebar
Communications Backbone System
backbone-message-format
Commits
38420028
Verified
Commit
38420028
authored
7 months ago
by
Dan Jones
Browse files
Options
Download
Email Patches
Plain Diff
feat: enable flask debug mode from env var
parent
43d499c4
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
3 additions
and
1 deletion
+3
-1
generate_schema_config.py
generate_schema_config.py
+3
-1
No files found.
generate_schema_config.py
View file @
38420028
...
...
@@ -25,6 +25,8 @@ URL_PREFIX = os.getenv("URL_PREFIX", "")
FLASK_HOST
=
os
.
getenv
(
"FLASK_HOST"
,
"localhost"
)
# Allow env override of default port
FLASK_PORT
=
os
.
getenv
(
"FLASK_PORT"
,
5000
)
# Switch on debug mode if env var is truthy
FLASK_DEBUG
=
os
.
getenv
(
"FLASK_DEBUG"
,
"False"
).
lower
()
in
(
"true"
,
"1"
,
"t"
)
swagger_config
=
{
...
...
@@ -156,7 +158,7 @@ def serve(swagger_config):
Run as local flask app on FLASK_PORT|5000
"""
app
=
configure_flask
(
swagger_config
)
app
.
run
(
debug
=
True
,
host
=
FLASK_HOST
,
port
=
FLASK_PORT
)
app
.
run
(
debug
=
FLASK_DEBUG
,
host
=
FLASK_HOST
,
port
=
FLASK_PORT
)
def
compile_schema
(
swagger_config
):
...
...
This diff is collapsed.
Click to expand it.
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment