Add plugin system and notice plugin (#503)

* Update system notice to plugin

* Add plugin model alembic support

* update plugin conf

* add plugin route injection

* update plugin route inject

* fix and optimize plugin router inject
This commit is contained in:
Wu Clan
2025-02-13 21:19:49 +08:00
committed by GitHub
parent 1e0b04006b
commit d9985f9d4d
30 changed files with 274 additions and 62 deletions
-15
View File
@@ -1,20 +1,5 @@
#!/usr/bin/env python3
# -*- coding: utf-8 -*-
from pathlib import Path
import uvicorn
from backend.core.registrar import register_app
app = register_app()
if __name__ == '__main__':
# 如果你喜欢在 IDE 中进行 DEBUG,main 启动方法会很有帮助
# 如果你喜欢通过 print 方式进行调试,建议使用 fastapi cli 方式启动服务
try:
config = uvicorn.Config(app=f'{Path(__file__).stem}:app', reload=True)
server = uvicorn.Server(config)
server.run()
except Exception as e:
raise e