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.middleware.cors import CORSMiddleware
|
||||
from .db import initialize_database
|
||||
from .routers import admin_login
|
||||
from .routers import admin_user
|
||||
@ -27,20 +26,6 @@ from .routers import bell
|
||||
|
||||
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()
|
||||
|
||||
|
||||
@ -1,12 +1,12 @@
|
||||
[mysql]
|
||||
host = localhost
|
||||
port = 3306
|
||||
user = tguser
|
||||
password = jagxor-xokwis-dekqE6
|
||||
database = table_game
|
||||
user = root
|
||||
password = hzc03566
|
||||
database = tgst01
|
||||
|
||||
[jwt]
|
||||
key = jagxor-xokwis-dekqE6
|
||||
key = your_jwt_secret_key
|
||||
|
||||
[price]
|
||||
unit_price = 0.1
|
||||
|
||||
@ -1,5 +1,5 @@
|
||||
import os
|
||||
|
||||
class Config:
|
||||
SECRET_KEY = os.getenv('SECRET_KEY', 'jagxor-xokwis-dekqE6')
|
||||
BASE_API_URL = os.getenv('BASE_API_URL', 'http://127.0.0.1:8000')
|
||||
SECRET_KEY = os.getenv('SECRET_KEY', 'your-secret-key')
|
||||
BASE_API_URL = os.getenv('BASE_API_URL', 'http://192.168.5.16:8000')
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user