Skip to content

Commit

Permalink
Merge pull request #12741 from SadiqOnGithub/patch-1
Browse files Browse the repository at this point in the history
Not Working: Throwing error with "localhost:27017"
  • Loading branch information
vkarpov15 committed Dec 16, 2022
2 parents ff67167 + 32ee09a commit dfd5eeb
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions docs/index.md
Expand Up @@ -32,9 +32,9 @@ const mongoose = require('mongoose');
main().catch(err => console.log(err));

async function main() {
await mongoose.connect('mongodb://localhost:27017/test');
await mongoose.connect('mongodb://127.0.0.1:27017/test');

// use `await mongoose.connect('mongodb://user:password@localhost:27017/test');` if your database has auth enabled
// use `await mongoose.connect('mongodb://user:password@127.0.0.1:27017/test');` if your database has auth enabled
}
```

Expand Down

0 comments on commit dfd5eeb

Please sign in to comment.