-
-
Notifications
You must be signed in to change notification settings - Fork 95
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
fix: how to connect to local MongoDB instance #351
Conversation
The current step on how to connect to a local MongoDB instance can cause the error detailed in the following issue: denodrivers#170 The proposed changes aim to fix that by replacing the "mongodb://localhost:27017" with "mongodb://127.0.0.1:27017". This fixed was submitted by @michaeldesu in the issue linked above.
Is this a windows only thing? On Linux and macOS it's completely the same? I don't see how this changes anything? |
Can only speak for Linux as I found this issue today running PopOS 22.04 LTS. Following the current instructions in the docs returns the following error:
That ceases to happen once we replace |
I don't like the solution to this problem localhost is 127.0.0.1 and ::1 We should dig a bit more into it. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is this a deno_mongo error? Or is this a Deno error even?
I would still change the docs to use But ideally, like you mentioned, both ways should work interchangeably. 😃 |
@filipe-freire can you help me how i can reproduce this issue in Ubuntu? |
@erfanium I can sure try :) The issue occurs when running a file with the following code:
You can run the file with the following flags: The output should be the following error:
|
I'm okay with that |
The current step on how to connect to a local MongoDB instance can cause the error detailed in the following issue:
#170
The proposed changes aim to fix that by replacing the "mongodb://localhost:27017" with "mongodb://127.0.0.1:27017".
This fixed was submitted by @michaeldesu in the issue linked above.