Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion app.py
Original file line number Diff line number Diff line change
Expand Up @@ -14,4 +14,5 @@

# start the app with port 5000 and debug on!
if __name__ == '__main__':
vuln_app.run(host='0.0.0.0', port=5000, debug=True)
port = int(os.getenv('PORT', 5000))
vuln_app.run(host='0.0.0.0', port=port, debug=True)
7 changes: 6 additions & 1 deletion models/user_model.py
Original file line number Diff line number Diff line change
@@ -1,12 +1,17 @@
import datetime
import jwt
import os
from sqlalchemy.orm import relationship
from config import db, vuln_app
from app import vuln, alive
from models.books_model import Book
from random import randrange
from random import randrange, seed
from sqlalchemy.sql import text

rand_seed = os.getenv('RAND_SEED')
if rand_seed is not None:
# Initialize the random seed if RAND_SEED is provided
seed(int(rand_seed))

class User(db.Model):
__tablename__ = 'users'
Expand Down