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

error when mongodb uri with mongodb+srv #168

Open
karabaralex opened this issue Mar 7, 2019 · 0 comments · May be fixed by enterstudio/rest-hapi#37
Open

error when mongodb uri with mongodb+srv #168

karabaralex opened this issue Mar 7, 2019 · 0 comments · May be fixed by enterstudio/rest-hapi#37

Comments

@karabaralex
Copy link

karabaralex commented Mar 7, 2019

steps to repro:

  1. create a mongodb cluster at Atlas
  2. get connection uri which looks like
    mongodb+srv://.mongodb.net/test?retryWrites=true
  3. add this uri to rest-hapi config
      mongo: {
        URI: 'mongodb+srv://<some>.mongodb.net/test?retryWrites=true',
      },
  1. npm start
UnhandledPromiseRejectionWarning: Error: Invalid mongodb uri "mongodb+srv://<name>mongodb.net/test?retryWrites=true". Must begin with "mongodb://"
    at muri (/node_modules/muri/lib/index.js:28:11)
    at NativeConnection.Connection._handleOpenArgs (/node_modules/mongoose/lib/connection.js:199:16)
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 a pull request may close this issue.

1 participant