Skip to content

Commit

Permalink
feat: Updated API/database.py
Browse files Browse the repository at this point in the history
  • Loading branch information
sweep-ai[bot] authored Mar 12, 2024
1 parent c692e31 commit bcbca6b
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion API/database.py
Original file line number Diff line number Diff line change
Expand Up @@ -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]

Expand Down

0 comments on commit bcbca6b

Please sign in to comment.