File tree Expand file tree Collapse file tree 2 files changed +4
-15
lines changed
standard_python3/hello_world Expand file tree Collapse file tree 2 files changed +4
-15
lines changed Original file line number Diff line number Diff line change 13
13
# limitations under the License.
14
14
15
15
# [START gae_flex_quickstart]
16
- import logging
17
-
18
16
from flask import Flask
19
17
20
18
@@ -27,17 +25,8 @@ def hello():
27
25
return 'Hello World!'
28
26
29
27
30
- @app .errorhandler (500 )
31
- def server_error (e ):
32
- logging .exception ('An error occurred during a request.' )
33
- return """
34
- An internal error occurred: <pre>{}</pre>
35
- See logs for full stacktrace.
36
- """ .format (e ), 500
37
-
38
-
39
28
if __name__ == '__main__' :
40
- # This is used when running locally. Gunicorn is used to run the
41
- # application on Google App Engine. See entrypoint in app.yaml .
29
+ # This is used when running locally only. When deploying to Google App
30
+ # Engine, a webserver process such as Gunicorn will serve the app.
42
31
app .run (host = '127.0.0.1' , port = 8080 , debug = True )
43
32
# [END gae_flex_quickstart]
Original file line number Diff line number Diff line change @@ -30,8 +30,8 @@ def hello():
30
30
31
31
if __name__ == '__main__' :
32
32
# This is used when running locally only. When deploying to Google App
33
- # Engine, a webserver process such as Gunicorn will serve the app. This
34
- # can be configured by adding an `entrypoint` to app.yaml.
33
+ # Engine, a webserver process such as Gunicorn will serve the app. You
34
+ # can configure startup instructions by adding `entrypoint` to app.yaml.
35
35
app .run (host = '127.0.0.1' , port = 8080 , debug = True )
36
36
# [END gae_python3_app]
37
37
# [END gae_python38_app]
You can’t perform that action at this time.
0 commit comments