runhttps.py 467 B

123456789101112131415
  1. from backstage import create_app
  2. #from models import create_app
  3. import logging
  4. logger = logging.getLogger(__name__)
  5. app = create_app()
  6. if __name__ == '__main__':
  7. context = ('/etc/letsencrypt/live/bhouse3.ptt.cx/fullchain.pem', '/etc/letsencrypt/live/bhouse3.ptt.cx/privkey.pem')
  8. logging.basicConfig(
  9. level=logging.INFO,
  10. format='%(asctime)s %(levelname)s %(message)s')
  11. app.run(host='0.0.0.0', debug=True, port=9002, ssl_context=context)