Ali2206 commited on
Commit
219a358
·
verified ·
1 Parent(s): 081d154

Update core/config.py

Browse files
Files changed (1) hide show
  1. core/config.py +6 -23
core/config.py CHANGED
@@ -1,26 +1,9 @@
1
- from pydantic import BaseSettings
2
- from typing import Optional
3
  import os
4
 
5
- class Settings(BaseSettings):
6
- # Application
7
- PROJECT_NAME: str = "Medical EHR System"
8
- API_V1_STR: str = "/api/v1"
9
- SERVER_HOST: str = "0.0.0.0"
10
- SERVER_PORT: int = 8000
11
- DEBUG: bool = True
12
-
13
- # Security
14
- SECRET_KEY: str = os.getenv("SECRET_KEY", "change-me-in-production")
15
- ALGORITHM: str = "HS256"
16
- ACCESS_TOKEN_EXPIRE_MINUTES: int = 60 * 24 * 7 # 1 week
17
-
18
- # Database
19
- MONGODB_URL: str = os.getenv("MONGODB_URL", "mongodb://localhost:27017")
20
- MONGODB_NAME: str = os.getenv("MONGODB_NAME", "ehr_db")
21
-
22
- class Config:
23
- case_sensitive = True
24
- env_file = ".env"
25
 
26
- settings = Settings()
 
 
 
 
1
  import os
2
 
3
+ SECRET_KEY = os.getenv("SECRET_KEY", "your-secret-key")
4
+ ALGORITHM = "HS256"
5
+ ACCESS_TOKEN_EXPIRE_MINUTES = 60 # Increased from 30 to 60 minutes
6
+ MONGO_URI = os.getenv("MONGO_URI")
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
7
 
8
+ if not MONGO_URI:
9
+ raise RuntimeError("MONGO_URI not set!")