Merge branch 'fixmongosettings' into main
This commit is contained in:
@@ -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"
|
||||||
}
|
}
|
||||||
8
main.py
8
main.py
@@ -25,11 +25,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)
|
||||||
|
|||||||
Reference in New Issue
Block a user