am_dot_com

CN 2022-04-22

Apr 22nd, 2022 (edited)
33
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.55 KB | None | 0 0
  1. #helloworld.py
  2. from flask import Flask
  3.  
  4. app = Flask(__name__) #cuidado! Afeta app.yaml
  5.  
  6. @app.route('/')
  7. def hello():
  8. return 'Hello World!'
  9.  
  10. if __name__ == '__main__':
  11. # This is used when running locally only. When deploying to Google App
  12. # Engine, a webserver process such as Gunicorn will serve the app.
  13. app.run(
  14. host='127.0.0.1',
  15. port=8080,
  16. debug=True
  17. )
  18.  
  19. *****************
  20.  
  21. requirements.txt
  22.  
  23. Flask
  24. gunicorn
  25.  
  26. ************
  27.  
  28. runtime: python38
  29. entrypoint: gunicorn -w 2 helloworld:app
  30.  
  31.  
  32.  
  33.  
Add Comment
Please, Sign In to add comment