Skip to content

Commit 721412d

Browse files
author
Kraig Brockschmidt
committed
Allow flask 1.x, match runserver.py code to tutorial
1 parent 222135c commit 721412d

File tree

2 files changed

+4
-4
lines changed

2 files changed

+4
-4
lines changed

requirements.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
Flask<1
1+
flask

runserver.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,11 @@
1-
import os
1+
from os import environ
22
from HelloFlask import app
33

44
if __name__ == '__main__':
5-
HOST = os.environ.get('SERVER_HOST', 'localhost')
5+
HOST = environ.get('SERVER_HOST', 'localhost')
66

77
try:
8-
PORT = int(os.environ.get('SERVER_PORT', '5555'))
8+
PORT = int(environ.get('SERVER_PORT', '5555'))
99
except ValueError:
1010
PORT = 5555
1111

0 commit comments

Comments
 (0)