parse-database-url
Advanced tools
Comparing version 0.2.1 to 0.2.2
@@ -19,5 +19,10 @@ var url = require("url"); | ||
// The protocol coming from url.parse() has a trailing : | ||
config.driver = (parsedUrl.protocol || "sqlite3:").replace(/\:$/, ""); | ||
config.driver = (parsedUrl.protocol || "sqlite3:") | ||
// The protocol coming from url.parse() has a trailing : | ||
.replace(/\:$/, "") | ||
// Cloud Foundry will sometimes set a 'mysql2' scheme instead of 'mysql'. | ||
if (config.driver == "mysql2") | ||
config.driver = "mysql"; | ||
// url.parse() produces an "auth" that looks like "user:password". No | ||
@@ -24,0 +29,0 @@ // individual fields, unfortunately. |
{ | ||
"name": "parse-database-url", | ||
"version": "0.2.1", | ||
"version": "0.2.2", | ||
"description": "Database configuration URL parser for node.js", | ||
@@ -5,0 +5,0 @@ "keywords": ["database", "configuration", "url", "heroku", "database_url"], |
@@ -73,2 +73,14 @@ [ | ||
{ | ||
"desc": "Cloud Foundry ClearDB connection string with mysql2 scheme", | ||
"url": "mysql2://user:pass@host/database?reconnect=true", | ||
"config": { | ||
"driver": "mysql", | ||
"user": "user", | ||
"password": "pass", | ||
"host": "host", | ||
"database": "database", | ||
"reconnect": "true" | ||
} | ||
}, | ||
{ | ||
"desc": "Redis URL, which doesn't have a path (Issue #4)", | ||
@@ -75,0 +87,0 @@ "url": "redis://localhost:6379", |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
8475
167