update: 添加了deta的支持

This commit is contained in:
RTAkland
2022-12-29 15:47:41 +08:00
parent 81f6d590eb
commit 59b1abccb3
1 file changed
+4 -2
+4 -2
View File
@@ -12,6 +12,8 @@ class Config:
Available database: sqlite3, mysql Available database: sqlite3, mysql
sqlite3 -> sqlite3 (default) sqlite3 -> sqlite3 (default)
mysql -> user:pwd@host:port/db mysql -> user:pwd@host:port/db
deta -> deta
""" """
database = os.getenv('COUNTER_DB') or "root:123@gd.dgtmc.top:3306/" # Database type database = os.getenv('COUNTER_DB') or "sqlite3" # 数据库类型
DETA = False if not os.getenv('DETA_RUNTIME') else True # mark deta if os.getenv("PJ_DETA") is not None:
database = "deta" # 自动设置为deta