Skip to content

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