2020import os
2121
2222if __name__ == "__main__" :
23- # You have several options for running the web server.
24-
25- ### OPTION 1: Unsecured localhost
26- # When running locally on unsecured HTTP, use this line to disable
27- # OAuthlib's HTTPs verification.
28-
29- # Important: When running in production *do not* leave this option enabled.
30- # os.environ["OAUTHLIB_INSECURE_TRANSPORT"] = "1"
31-
32- # Run the application on a local server, defaults to http://localhost:5000.
33- # Note: the OAuth flow requires a TLD, *not* an IP address; "localhost" is
34- # acceptable, but http://127.0.0.1 is not.
35- # app.run(debug=True)
36-
37- ### OPTION 2: Secure localhost
38- # Run the application over HTTPs with a locally stored certificate and key.
39- # Defaults to https://localhost:5000.
40- app .run (
41- host = "localhost" ,
42- ssl_context = ("localhost.pem" , "localhost-key.pem" ),
43- debug = True )
44-
45- ### OPTION 3: Production- or cloud-ready server
46- # Start a Gunicorn server, which is appropriate for use in production or a
47- # cloud deployment.
48- # server_port = os.environ.get("PORT", "8080")
49- # app.run(debug=True, port=server_port, host="0.0.0.0")
23+ # You have several options for running the web server.
24+
25+ ### OPTION 1: Unsecured localhost
26+ # When running locally on unsecured HTTP, use this line to disable
27+ # OAuthlib's HTTPs verification.
28+
29+ # Important: When running in production *do not* leave this option enabled.
30+ # os.environ["OAUTHLIB_INSECURE_TRANSPORT"] = "1"
31+
32+ # Run the application on a local server, defaults to http://localhost:5000.
33+ # Note: the OAuth flow requires a TLD, *not* an IP address; "localhost" is
34+ # acceptable, but http://127.0.0.1 is not.
35+ # app.run(debug=True)
36+
37+ ### OPTION 2: Secure localhost
38+ # Run the application over HTTPs with a locally stored certificate and key.
39+ # Defaults to https://localhost:5000.
40+ app .run (
41+ host = "localhost" ,
42+ ssl_context = ("localhost.pem" , "localhost-key.pem" ),
43+ debug = True ,
44+ )
45+
46+ ### OPTION 3: Production- or cloud-ready server
47+ # Start a Gunicorn server, which is appropriate for use in production or a
48+ # cloud deployment.
49+ # server_port = os.environ.get("PORT", "8080")
50+ # app.run(debug=True, port=server_port, host="0.0.0.0")
0 commit comments