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

Exit on startup when MongoDB connection fails #223

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

10xLaCroixDrinker
Copy link

Waits for MongoDB connection before starting the application and exits if the connection fails with error message. Currently the application starts but crashes once a request is made to the DB when it fails to connect initially.

The error event that exists is only triggered when there are errors in the connection after its been established. Awaiting the connection and logging on catch will get the failure to connect.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant