Converts a shell connection string (from Atlas) to a MongoDB URL.
npm install mongodb-shell-to-urlConverts a shell connection string (from Atlas) to a MongoDB URL.
``javascript
var shellToUrl = require('mongodb-shell-to-url');
var connectionString = 'mongo "mongodb://localhost:27017?replicaSet=MyCluster" --ssl --username hans';
console.log(shellToUrl(connectionString));
// logs "mongodb://hans:PASSWORD@localhost:27017?ssl=true&replicaSet=MyCluster&authSource=admin"
`
- [ ] requires a MongoDB URI in double-quotes
- [ ] does not support --hostname, --port yetPASSWORD
- [ ] ignores password and hard-codes to for security reasons?`, sorry :-)
- [ ] only works if the original MongoDB URL contains a
Apache 2.0
[travis_img]: https://img.shields.io/travis/mongodb-js/mongodb-shell-to-url.svg
[travis_url]: https://travis-ci.org/mongodb-js/mongodb-shell-to-url
[npm_img]: https://img.shields.io/npm/v/mongodb-shell-to-url.svg
[npm_url]: https://npmjs.org/package/mongodb-shell-to-url