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

Connection options #35

Open
wants to merge 11 commits into
base: master
Choose a base branch
from
Open

Conversation

razvanc92
Copy link

Added options when creating the Mongo connection and if user/pass is provided then it will auth.

@eberhara
Copy link
Member

eberhara commented Aug 3, 2017

@razvanc92 did you see the unit tests are failing?

  1) Mongration.Migration "before each" hook:
     Uncaught TypeError: Cannot read property 'pass' of undefined
      at MongoConnection.<anonymous> (src/utils/mongo-connection.js:26:24)
      at node_modules/mongodb/lib/mongo_client.js:406:11
      at _combinedTickCallback (internal/process/next_tick.js:73:7)
      at process._tickCallback (internal/process/next_tick.js:104:9)

Since options is not required, if(this.options.pass || this.options.user) will trigger that undefined on mongo-connection:26.

@razvanc92
Copy link
Author

@eberhara I fixed the error. If you have any other comments/recommendations just let me know.

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.

3 participants