refactor: Restructure project into a scalable package layout
This commit undertakes a major architectural refactoring to improve project organization, scalability, and maintainability
This commit is contained in:
parent
e8c84ba809
commit
69ffcee98f
6 changed files with 129 additions and 87 deletions
20
config.py
Normal file
20
config.py
Normal file
|
|
@ -0,0 +1,20 @@
|
|||
import os
|
||||
from dotenv import load_dotenv
|
||||
|
||||
# Find the absolute path of the root directory
|
||||
basedir = os.path.abspath(os.path.dirname(__file__))
|
||||
load_dotenv(os.path.join(basedir, '.env'))
|
||||
|
||||
class Config:
|
||||
# General Config
|
||||
JWT_KEY = os.getenv('JWT_KEY')
|
||||
JWT_EXPIRE = int(os.getenv('JWT_EXPIRATION', 30))
|
||||
|
||||
# Database
|
||||
DB_HOST = os.getenv('DB_HOST')
|
||||
DB_USER = os.getenv('DB_USER')
|
||||
DB_PASSWORD = os.getenv('DB_PASSWORD')
|
||||
DB_NAME = os.getenv('DB_NAME')
|
||||
|
||||
# Admin
|
||||
ADMIN_KEY = os.getenv('ADMIN_KEY')
|
||||
Loading…
Add table
Add a link
Reference in a new issue