Git Product home page Git Product logo

mongodb-uri-node's People

Contributors

chmontgomery avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

mongodb-uri-node's Issues

Mongoose connects to MongoLab DB but cannot read data (Auth Error)

I set up my config like this:

var config = {
  "scheme": "mongodb",
  "hosts": [
    {
      "host": "ds1111-a1.mongolab.com",
      "port": 1234
    }
  ],
  "username": "user:n@me",
  "password": "p@ssword",
  "options": {
    "authSource": "@dmin"
  },
  "database": "d@tabase"
}

Then:

var uriUtil = require('mongodb-uri');
var mongodbUri = uriUtil.format(config);
var mongooseUri = uriUtil.formatMongoose(mongodbUri);
mongoose.connect(mongooseUri);

The app connects to the db successfully, but when I make a query, I get this error: 'MongoError: not authorized for query on 'dbname.coll'

Since it's pointing to auth, I tried with the username and password in the options, but I still get same error.

Any ideas on what's causing this?

Can I take over this lib?

Hi, I would love to take over this package and unify all the "mongoDB URI builders" out there under one roof.
We need a MongoDB URI builder lib, and there are a lot of them, but they are all outdated and not maintained anymore.

I build this GUI tool for MongoDB URI and also the Mingo -- The best GUI for MongoDB.

Can I please take over this lib and continue in work you started?
Thanks!

Support for IPv6 addresses

This nice tool should also support IPv6 addresses. In 2022 it is getting more and more relevant.

None of these are currently working:

uriObj = mongoURI.parse("mongodb://user:password@[::1]:27017/mip?authSource=admin");
uriObj = mongoURI.parse("mongodb://user:password@[fe80::81e6:5666:f147:7ef8]:27017/mip?authSource=admin");
uriObj = mongoURI.parse("mongodb://[fe80::81e6:5666:f147:7ef8]:27017/mip?authSource=admin");
uriObj = mongoURI.parse("mongodb://[::1]:27017");

See my proposal at https://github.com/Wernfried/mongodb-uri-node/blob/patch-1/mongodb-uri.js

Best Regards
Wernfried

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.