Advertisement
ajr-dev

website.wsgi

Aug 3rd, 2020
146
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Python 0.52 KB | None | 0 0
  1. import os
  2. import sys
  3.  
  4. sys.path.append("/home/username/public_html/flask");
  5. sys.path.insert(0, os.path.dirname(__file__))
  6.  
  7. try:
  8.     from website import main, app as application
  9. except e:
  10.     from error_app import app as application
  11.     application.logger.error(e)
  12.  
  13. # If we are executing this file directly
  14. if __name__ == '__main__':
  15.     # Log a warning as this file should be run by Apache WSGI
  16.     application.logger.warning('Running manually.  Is something wrong?')
  17.     application.run(host='0.0.0.0', debug=False)
  18.  
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement