app.py 580 B

1234567891011121314151617181920212223
  1. """
  2. This script runs the application using a development server.
  3. It contains the definition of routes and views for the application.
  4. """
  5. from flask import Flask;
  6. appVar = Flask(__name__)
  7. # Make the WSGI interface available at the top level so wfastcgi can get it.
  8. wsgi_app = appVar.wsgi_app
  9. #import routes
  10. from routes import *;
  11. #DevServer stup
  12. if __name__ == '__main__':
  13. import os
  14. HOST = os.environ.get('SERVER_HOST', 'localhost')
  15. try:
  16. PORT = int(os.environ.get('SERVER_PORT', '5555'))
  17. except ValueError:
  18. PORT = 5555
  19. appVar.run(HOST, PORT)