convert from connection to pools in mysql
This commit is contained in:
@@ -10,16 +10,18 @@ from flask_cors import CORS
|
||||
from dotenv import load_dotenv
|
||||
from db_client import DBClient
|
||||
from user import registerUserEndpoints
|
||||
import logging
|
||||
|
||||
load_dotenv()
|
||||
app = Flask(__name__)
|
||||
app.config['JSON_AS_ASCII'] = False # Ensures non-ASCII characters are preserved
|
||||
logging.basicConfig(level=logging.INFO)
|
||||
allowed_origins = [
|
||||
"https://nyipyatki.davydovcloud.com",
|
||||
"https://nyipyatki-dev.davydovcloud.com",
|
||||
]
|
||||
CORS(app, resources={r"*": {"origins": allowed_origins}}) # Only allow example.com
|
||||
database = DBClient()
|
||||
database = DBClient(app)
|
||||
registerUserEndpoints(app=app, database=database)
|
||||
|
||||
if __name__ == "__main__":
|
||||
|
||||
Reference in New Issue
Block a user