Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Allow configuration via DB URL #327

Merged
merged 2 commits into from
May 31, 2024
Merged

Allow configuration via DB URL #327

merged 2 commits into from
May 31, 2024

Conversation

cvele
Copy link
Contributor

@cvele cvele commented May 26, 2024

@andrew-codes

Add support for database URLs in getDbClient to enhance compatibility with MongoDB Atlas and similar services

Refactored the getDbClient function to accept a url parameter in the DbConnectionOptions. This change enables the use of MongoDB connection strings, which are necessary for services like MongoDB Atlas that use different connection schemas. By allowing the use of a full URL, we ensure better flexibility and compatibility with various database hosting services, simplifying the connection process and improving maintainability.

@cvele cvele marked this pull request as ready for review May 26, 2024 10:51
Copy link
Owner

@andrew-codes andrew-codes left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank you for your contribution! I left a minor note of feedback.

apps/game-db-updater/src/dbClient.ts Show resolved Hide resolved
@andrew-codes andrew-codes changed the base branch from release-3.1.x to release-3.2.x May 28, 2024 15:19
@andrew-codes andrew-codes linked an issue May 28, 2024 that may be closed by this pull request
- Update getDbClient function to accept either DbConnectionString or DbConnectionOptions
- Ensure MongoClient initialization based on the type of connection options provided
@andrew-codes andrew-codes merged commit bfb5e5a into andrew-codes:release-3.2.x May 31, 2024
2 of 4 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Archived in project
Development

Successfully merging this pull request may close these issues.

Support cloud hosted Mongo databases
2 participants