(parse-mongo-url mongo-url-str)
Takes a string representing a mongod connection and returns a map representing the connection information.
ex. (parse-mongo-url "mongodb://foo:bar@localhost:123/database?asdf=zxcv") ;; => {:host "localhost" :db "zaarly" :port 27107 :username "foo" :password "bar" :asdf "zxcv"}
Takes a string representing a mongod connection and returns a map representing the connection information. ex. (parse-mongo-url "mongodb://foo:bar@localhost:123/database?asdf=zxcv") ;; => {:host "localhost" :db "zaarly" :port 27107 :username "foo" :password "bar" :asdf "zxcv"}
(parse-password uri)
ex. uri http://foo:bar@zaarly.com returns "bar"
.
ex. uri http://foo:bar@zaarly.com returns `"bar"`.
(parse-username uri)
ex. uri http://foo:bar@zaarly.com returns "foo"
.
ex. uri http://foo:bar@zaarly.com returns `"foo"`.
cljdoc is a website building & hosting documentation for Clojure/Script libraries
× close