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_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_user_endpoint = "https://api.github.com/user"
mongoUser = 'root'
mongoUser = settings["mongo_user"]
mongoPassword = settings["mongo_password"]
mongoHost = 'localhost'
mongoPort = '27017'
mongoDatabase = 'database'
mongoHost = settings["mongo_host"]
mongoPort = int(settings["mongo_port"])
mongoDatabase = settings["mongo_db"]
mongoUri = f'mongodb://{mongoUser}:{mongoPassword}@{mongoHost}:{mongoPort}/'
print(mongoUri)