Skip to content

Commit e48d255

Browse files
committed
Fix: Add eventlet and JWT auth routes
1 parent 9804260 commit e48d255

2 files changed

Lines changed: 15 additions & 2 deletions

File tree

app.py

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -79,6 +79,10 @@
7979

8080
import os
8181
from dotenv import load_dotenv
82+
# Import at top of file
83+
from auth import JWTAuthManager
84+
85+
8286

8387
load_dotenv()
8488

@@ -145,6 +149,15 @@ class Config:
145149
max_http_buffer_size=Config.MAX_CONTENT_LENGTH
146150
)
147151

152+
# Add after socketio initialization
153+
jwt_manager = JWTAuthManager(
154+
secret_key=Config.SECRET_KEY,
155+
access_token_expiry=3600,
156+
refresh_token_expiry=604800
157+
)
158+
jwt_manager.init_auth_endpoints(app)
159+
app.config['JWT_MANAGER'] = jwt_manager
160+
148161

149162
# DATABASE CONNECTION POOL
150163

railway.toml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,6 @@
22
builder = "nixpacks"
33

44
[deploy]
5-
startCommand = "gunicorn -w 2 app:app --bind 0.0.0.0:$PORT"
5+
startCommand = "gunicorn --worker-class eventlet -w 1 app:app --bind 0.0.0.0:$PORT"
66
restartPolicyType = "on_failure"
7-
restartPolicyMaxRetries = 10
7+
restartPolicyMaxRetries = 10

0 commit comments

Comments
 (0)