19 lines
434 B
Python
19 lines
434 B
Python
|
|
"""
|
|
backend/run.py
|
|
开发环境启动脚本
|
|
"""
|
|
from app import create_app, db
|
|
from app.models import User, Agent
|
|
|
|
app = create_app('development')
|
|
|
|
@app.shell_context_processor
|
|
def make_shell_context():
|
|
return {'db': db, 'User': User, 'Agent': Agent}
|
|
|
|
if __name__ == '__main__':
|
|
# MacOS ControlCenter uses port 5000, so we use 5052
|
|
# (原5002易被Trae IDE自动端口转发劫持)
|
|
app.run(host='0.0.0.0', port=5052)
|