This commit is contained in:
2025-09-17 21:38:45 +08:00
parent e7d245319c
commit 461c5bb508
10 changed files with 3240 additions and 0 deletions
+14
View File
@@ -0,0 +1,14 @@
import os
import subprocess
# 设置Flask应用程序环境变量
os.environ['FLASK_APP'] = 'app.py'
os.environ['FLASK_ENV'] = 'development'
print("Starting Flask server...")
print("Server will be available at http://localhost:5000/")
print("To allow external access, it's listening on all interfaces (0.0.0.0)")
print("Press Ctrl+C to stop the server")
# 启动Flask服务器,允许外部访问
subprocess.run(['python', '-m', 'flask', 'run', '--host=0.0.0.0'])