mongodb-js / mongodb-schema

Infer a probabilistic schema for a MongoDB collection.

Home Page:https://github.com/mongodb-js/mongodb-schema

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Support srv uri host names

charlielittle opened this issue · comments

Allow the URI of the form mongodb+srv://, which is needed for Atlas connections.
Attaching fixed mongodb-schema file which loosens the assumption on the URI parameter
if (!uri.startsWith('mongodb://') && !uri.startsWith("mongodb+srv://") ) { uri = 'mongodb://' + uri; } console.log(URI: ${uri})