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

Commit 7b10c4af by sdepold

Merge branch 'heroku-constring-fix' of https://github.com/danielschwartz/sequeli…

…ze into danielschwartz-heroku-constring-fix
2 parents df85321a 57cfac48
......@@ -44,13 +44,14 @@ module.exports = (function() {
this.isConnecting = true
this.isConnected = false
var conStr = 'tcp://<%= user %>:<%= password %>@<%= host %>:<%= port %>/<%= database %>'
var conStr = '<%= protocol %>://<%= user %>:<%= password %>@<%= host %><% if(port) { %>:<%= port %><% } %>/<%= database %>';
conStr = Utils._.template(conStr)({
user: this.config.username,
password: this.config.password,
database: this.config.database,
host: this.config.host,
port: this.config.port
port: this.config.port,
protocol: this.config.protocol,
})
var pg = require("pg")
......
......@@ -15,6 +15,7 @@ module.exports = (function() {
dialect: 'mysql',
host: 'localhost',
port: 3306,
protocol: 'tcp',
define: {},
query: {},
sync: {},
......@@ -32,7 +33,8 @@ module.exports = (function() {
password: (( (["", null, false].indexOf(password) > -1) || (typeof password == 'undefined')) ? null : password),
host : this.options.host,
port : this.options.port,
pool : this.options.pool
pool : this.options.pool,
protocol: this.options.protocol
}
var ConnectorManager = require("./dialects/" + this.options.dialect + "/connector-manager")
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!