app.py 271 B

123456789
  1. import sys, os
  2. from flask import Flask
  3. if getattr(sys, 'frozen', False):
  4. template_folder = os.path.join(sys._MEIPASS, "client")
  5. else:
  6. template_folder = "../client"
  7. app = Flask(__name__, template_folder=template_folder, static_folder=f"{template_folder}/static")