diff --git a/config/example-settings.json b/config/example-settings.json index e50a598..29e8ac5 100644 --- a/config/example-settings.json +++ b/config/example-settings.json @@ -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" } \ No newline at end of file diff --git a/main.py b/main.py index 381f413..2fc9f59 100644 --- a/main.py +++ b/main.py @@ -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)