Compare commits
No commits in common. "06bf6c4cc946a6a32fd8c931a803b819006c6347" and "686c8fd07a419419562e2c1622a71a769b670c3b" have entirely different histories.
06bf6c4cc9
...
686c8fd07a
@ -1,5 +1,4 @@
|
|||||||
from fastapi import FastAPI
|
from fastapi import FastAPI
|
||||||
from fastapi.middleware.cors import CORSMiddleware
|
|
||||||
from .db import initialize_database
|
from .db import initialize_database
|
||||||
from .routers import admin_login
|
from .routers import admin_login
|
||||||
from .routers import admin_user
|
from .routers import admin_user
|
||||||
@ -27,20 +26,6 @@ from .routers import bell
|
|||||||
|
|
||||||
app = FastAPI()
|
app = FastAPI()
|
||||||
|
|
||||||
origins = [
|
|
||||||
"https://table-game-backend.miniprogram.ahaostudio.tech",
|
|
||||||
"http://127.0.0.1:65450",
|
|
||||||
"http://localhost:65450"
|
|
||||||
]
|
|
||||||
|
|
||||||
app.add_middleware(
|
|
||||||
CORSMiddleware,
|
|
||||||
allow_origins=origins, # 允许的域
|
|
||||||
allow_credentials=True,
|
|
||||||
allow_methods=["*"], # 允许所有 HTTP 方法
|
|
||||||
allow_headers=["*"], # 允许所有请求头
|
|
||||||
)
|
|
||||||
|
|
||||||
# 初始化数据库
|
# 初始化数据库
|
||||||
initialize_database()
|
initialize_database()
|
||||||
|
|
||||||
|
|||||||
@ -1,12 +1,12 @@
|
|||||||
[mysql]
|
[mysql]
|
||||||
host = localhost
|
host = localhost
|
||||||
port = 3306
|
port = 3306
|
||||||
user = tguser
|
user = root
|
||||||
password = jagxor-xokwis-dekqE6
|
password = hzc03566
|
||||||
database = table_game
|
database = tgst01
|
||||||
|
|
||||||
[jwt]
|
[jwt]
|
||||||
key = jagxor-xokwis-dekqE6
|
key = your_jwt_secret_key
|
||||||
|
|
||||||
[price]
|
[price]
|
||||||
unit_price = 0.1
|
unit_price = 0.1
|
||||||
|
|||||||
@ -1,5 +1,5 @@
|
|||||||
import os
|
import os
|
||||||
|
|
||||||
class Config:
|
class Config:
|
||||||
SECRET_KEY = os.getenv('SECRET_KEY', 'jagxor-xokwis-dekqE6')
|
SECRET_KEY = os.getenv('SECRET_KEY', 'your-secret-key')
|
||||||
BASE_API_URL = os.getenv('BASE_API_URL', 'http://127.0.0.1:8000')
|
BASE_API_URL = os.getenv('BASE_API_URL', 'http://192.168.5.16:8000')
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user