MongoDB settings are now changed in settings.json

This commit is contained in:
2025-09-28 20:34:14 +01:00
parent dea4b79014
commit dedf35c513
2 changed files with 9 additions and 5 deletions

View File

@@ -30,5 +30,9 @@
"client_id":"client_id", "client_id":"client_id",
"client_secret":"client_secret" "client_secret":"client_secret"
}, },
"mongo_password":"yourMongoPassword" "mongo_password":"yourMongoPassword",
"mongo_host":"localhost",
"mongo_port":"27017",
"mongo_db":"database",
"mongo_user":"root"
} }

View File

@@ -23,11 +23,11 @@ github_auth_endpoint = f"https://github.com/login/oauth/authorize?response_type=
github_token_endpoint = "https://github.com/login/oauth/access_token" github_token_endpoint = "https://github.com/login/oauth/access_token"
github_user_endpoint = "https://api.github.com/user" github_user_endpoint = "https://api.github.com/user"
mongoUser = 'root' mongoUser = settings["mongo_user"]
mongoPassword = settings["mongo_password"] mongoPassword = settings["mongo_password"]
mongoHost = 'localhost' mongoHost = settings["mongo_host"]
mongoPort = '27017' mongoPort = int(settings["mongo_port"])
mongoDatabase = 'database' mongoDatabase = settings["mongo_db"]
mongoUri = f'mongodb://{mongoUser}:{mongoPassword}@{mongoHost}:{mongoPort}/' mongoUri = f'mongodb://{mongoUser}:{mongoPassword}@{mongoHost}:{mongoPort}/'
print(mongoUri) print(mongoUri)