app.py 635 B

123456789101112131415161718192021
  1. '''
  2. Created on 04-Sep-2019
  3. @author: bkadambi
  4. '''
  5. # -*- coding: UTF-8 -*-
  6. """
  7. hello_flask: First Python-Flask webapp
  8. """
  9. from flask import Flask # From module flask import class Flask
  10. app = Flask(__name__) # Construct an instance of Flask class for our webapp
  11. @app.route('/') # URL '/' to be handled by main() route handler
  12. def main():
  13. """Say hello"""
  14. return 'Hello, world!'
  15. if __name__ == '__main__': # Script executed directly?
  16. print("Hello, World. Uses S2I to build the application.")
  17. app.run(host="0.0.0.0", port=8080, debug=True,use_reloader=True) # Launch built-in web server and run this Flask webapp