Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

added mysql port option #15

Merged
merged 2 commits into from
Nov 14, 2017
Merged

added mysql port option #15

merged 2 commits into from
Nov 14, 2017

Conversation

spencerdcarlson
Copy link
Contributor

Tested with both:

var conString1 = 'mysql://root:@localhost:4217/db1'
var conSettings2 = {
dialect: 'mysql',
username: 'root',
password: '',
port: '4217',
database: 'db1',
host: 'localhost'
}

@@ -10,12 +10,21 @@ class MysqlClient {
var info = url.parse(options)
var auth = info.auth && info.auth.split(':')
var more = info.query && querystring.parse(info.query)
// get port from url parser, input options, or default to 3306
var port = ''
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

var port = info.port ? info.port : options.port ? options.port : '3306' is a cleaner option

@gimenete gimenete merged commit 3290ce2 into gimenete:master Nov 14, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants