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
Nikolai Maltsev
test-lab
Commits
ff7fafd1
Commit
ff7fafd1
authored
2 years ago
by
Nikolai Maltsev
Browse files
Options
Download
Email Patches
Plain Diff
Minor improvements
parent
62ce5b1b
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
3 additions
and
3 deletions
+3
-3
run.sh
run.sh
+1
-1
src/app.py
src/app.py
+2
-2
No files found.
run.sh
View file @
ff7fafd1
...
...
@@ -3,4 +3,4 @@ docker run -it --rm \
-h
testlabhost
\
-p
8009:8000
\
-e
PORT
=
8000
\
$TAG
:latest
\ No newline at end of file
$TAG
:latest
This diff is collapsed.
Click to expand it.
src/app.py
View file @
ff7fafd1
...
...
@@ -80,7 +80,7 @@ app.add_routes([
web
.
get
(
"/page3"
,
test3_handler
),
])
ENV_PORT
:
str
=
os
.
environ
.
get
(
'PORT'
)
port_number
=
int
(
ENV_PORT
)
if
ENV_PORT
is
not
None
and
ENV_PORT
.
isdigit
()
else
8000
port_number
=
int
(
os
.
environ
.
get
(
'PORT'
))
if
os
.
environ
.
get
(
'PORT'
).
isdigit
()
else
8000
web
.
run_app
(
app
,
port
=
port_number
)
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