18 lines
380 B
Python
18 lines
380 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 5002
|
|
app.run(host='0.0.0.0', port=5002)
|