From d9fbf77aa1cb02709f1209995d2cd61e5fdc2d3b Mon Sep 17 00:00:00 2001 From: Is Isilon Date: Tue, 2 Feb 2016 20:35:49 +0800 Subject: [PATCH] moved sync to initial_tasks prevent race conditions --- orm.js | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/orm.js b/orm.js index 8a0d20b..9d4c2c7 100644 --- a/orm.js +++ b/orm.js @@ -2,7 +2,7 @@ var Sequelize = require('sequelize'); /* http://sequelizejs.com/articles/heroku */ var parseUrl = function(url) { - var match = url.match(/([\w]+):\/\/([^:]+):([^@]+)@([^:]+):(\d+)\/(.+)/); + var match = url.match(/([\w]+):\/\/([^:]+):([^@]*)@([^:]*):(\d*)\/(.+)/); db = { database : match[6], username : match[2], @@ -23,4 +23,3 @@ module.exports = { return new Sequelize(db.database, db.username, db.password, db.options); } } -