forked from killua/TakwayPlatform
parent
8eb6b40f25
commit
61443c7330
|
@ -1,6 +1,6 @@
|
||||||
from app import app
|
from app import app, Config
|
||||||
import uvicorn
|
import uvicorn
|
||||||
|
|
||||||
|
|
||||||
if __name__ == "__main__":
|
if __name__ == "__main__":
|
||||||
uvicorn.run(app, host="0.0.0.0", port=7878)
|
uvicorn.run("app.main:app", host=Config.UVICORN.HOST, port=Config.UVICORN.PORT, workers=Config.UVICORN.WORKERS)
|
||||||
|
|
|
@ -2,6 +2,10 @@ class DevelopmentConfig:
|
||||||
SQLALCHEMY_DATABASE_URI = f"mysql+pymysql://admin02:LabA100102@127.0.0.1/takway?charset=utf8mb4" #mysql数据库连接配置
|
SQLALCHEMY_DATABASE_URI = f"mysql+pymysql://admin02:LabA100102@127.0.0.1/takway?charset=utf8mb4" #mysql数据库连接配置
|
||||||
REDIS_URL = "redis://:takway@127.0.0.1:6379/0" #redis数据库连接配置
|
REDIS_URL = "redis://:takway@127.0.0.1:6379/0" #redis数据库连接配置
|
||||||
LOG_LEVEL = "DEBUG" #日志级别
|
LOG_LEVEL = "DEBUG" #日志级别
|
||||||
|
class UVICORN:
|
||||||
|
HOST = "0.0.0.0" #uvicorn放行ip,0.0.0.0代表所有ip
|
||||||
|
PORT = 7878 #uvicorn运行端口
|
||||||
|
WORKERS = 24 #uvicorn进程数(通常与cpu核数相同)
|
||||||
class XF_ASR:
|
class XF_ASR:
|
||||||
APP_ID = "your_app_id" #讯飞语音识别APP_ID
|
APP_ID = "your_app_id" #讯飞语音识别APP_ID
|
||||||
API_SECRET = "your_api_secret" #讯飞语音识别API_SECRET
|
API_SECRET = "your_api_secret" #讯飞语音识别API_SECRET
|
||||||
|
|
Loading…
Reference in New Issue