Spaces:
Sleeping
Sleeping
| from app import app, mongo | |
| with app.app_context(): | |
| try: | |
| db = mongo.db | |
| # List collections to verify connection | |
| collections = db.list_collection_names() | |
| print("β MongoDB connected successfully!") | |
| print("Existing collections:", collections) | |
| except Exception as e: | |
| print("β MongoDB connection failed:", str(e)) | |