diff --git a/API/database.py b/API/database.py index ccdfc98..c2faefa 100644 --- a/API/database.py +++ b/API/database.py @@ -4,7 +4,8 @@ class Database: - def __init__(self, uri="mongodb://localhost:27017/", db_name="ImageDB"): + def __init__(self, db_name="ImageDB", use_local=False): + uri = "mongodb://localhost:27017/" if use_local else "your_cloud_mongodb_atlas_uri" self.client = MongoClient(uri) self.db = self.client[db_name]