A small utility (v0.1.0, last updated 2016) that converts MongoDB shell connection strings from Atlas into a standard MongoDB URL. Maintained by MongoDB-js, it parses shell commands like `mongo "mongodb://..." --ssl --username user` and outputs a connection URL with parameters. Known limitations: requires double-quoted URI, ignores password (replaces with PASSWORD), does not support --hostname/--port, and only works when the URL contains a query string. Not actively developed; considered stable for its narrow use case.
npm install mongodb-shell-to-urlNo compatibility data collected yet for this library.
Verified import paths — ran on the pinned version, not inferred.
Parses a MongoDB shell connection string and outputs a connection URL with query parameters.
Manually replace 'PASSWORD' with the real password in the output string.
Ensure the shell command uses double quotes around the URI: mongo "mongodb://..."
Add a query string to the URI (e.g., ?ssl=true) even if empty, or manually construct URL.
Use the full URI format in the shell command instead of --hostname/--port.
Use default import: const shellToUrl = require('mongodb-shell-to-url') or import shellToUrl from 'mongodb-shell-to-url'Ensure the shell URI includes a query string, e.g., mongodb://localhost:27017?replicaSet=MyCluster
Wrap the URI in double quotes: mongo "mongodb://..."
No dependency data recorded yet.