GitXplorerGitXplorer
g

parse-db-url

public
6 stars
2 forks
2 issues

Commits

List of commits on branch master.
Unverified
c0696d9fc6f7986dc11b82a304a7889bb1226aef

initial commit

ggrncdr committed 11 years ago

README

The README file for this repository.

parse-db-url

API

module.exports := (String) => {
    adapter:  String,
    host:     String?,
    port:     String?,
    database: String?,
    user:     String?,
    password: String?
}

Turn a string database URL into an object. This differs from a plain require('url').parse(...) in that it understands some conventions around different database drivers and query-string parameters can override those found earlier in the URL. (e.g. user=foo in the query string overrides a bar@host in the URL.

License

2-clause BSD