20250917
This commit is contained in:
@@ -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'])
|
||||
Reference in New Issue
Block a user