不要怂,就是干,撸起袖子干!

Commit ce09aba9 by Daniel Schwartz

adding disablePort flag, not loving the flag idea but I cant think of any other …

…way to do it since we should have a default port
1 parent e7c81156
...@@ -44,14 +44,15 @@ module.exports = (function() { ...@@ -44,14 +44,15 @@ module.exports = (function() {
this.isConnecting = true this.isConnecting = true
this.isConnected = false this.isConnected = false
var conStr = '<%= protocol %>://<%= user %>:<%= password %>@<%= host %><% if(port) { %>:<%= port %><% } %>/<%= database %>'; var conStr = '<%= protocol %>://<%= user %>:<%= password %>@<%= host %><% if(!disablePort) { %>:<%= port %><% } %>/<%= database %>';
conStr = Utils._.template(conStr)({ conStr = Utils._.template(conStr)({
user: this.config.username, user: this.config.username,
password: this.config.password, password: this.config.password,
database: this.config.database, database: this.config.database,
host: this.config.host, host: this.config.host,
port: this.config.port, port: this.config.port,
protocol: this.config.protocol protocol: this.config.protocol,
disablePort: this.config.disablePort
}) })
console.log(conStr); console.log(conStr);
......
...@@ -16,6 +16,7 @@ module.exports = (function() { ...@@ -16,6 +16,7 @@ module.exports = (function() {
host: 'localhost', host: 'localhost',
port: 3306, port: 3306,
protocol: 'tcp', protocol: 'tcp',
disablePort: false,
define: {}, define: {},
query: {}, query: {},
sync: {}, sync: {},
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!