sequelize-singleton
Advanced tools
Comparing version 0.1.3 to 0.1.4
@@ -21,3 +21,14 @@ "user strict"; | ||
); | ||
// Connect to MySQL | ||
sequelize | ||
.authenticate() | ||
.complete(function(err) { | ||
if (!!err) { | ||
console.log('Unable to connect to the database:', err); | ||
} else { | ||
console.log('Connection has been established to: \''+config.database+'\' Listening on: \''+config.opts.port+'\''); | ||
} | ||
}); | ||
return { | ||
@@ -32,5 +43,7 @@ DataTypes: Sequelize, | ||
if(!instance) { | ||
console.log("Creating instance"); | ||
instance = createInstance(config); | ||
} | ||
console.log("returning instance"); | ||
return instance; | ||
@@ -37,0 +50,0 @@ } |
{ | ||
"name": "sequelize-singleton", | ||
"version": "0.1.3", | ||
"version": "0.1.4", | ||
"author": "Jacob Spizziri <jacob.spizziri@gmail.com> (https://github.com/jspizziri)", | ||
@@ -5,0 +5,0 @@ "license": "BSD-2-Clause", |
@@ -24,3 +24,3 @@ sequelize-singleton is a simple singleton wrapper for the sequelize ORM, making it easier to configure and build models. | ||
``` | ||
var orm = require('sequelize-singleton'); | ||
var orm = require('sequelize-singleton')(); | ||
@@ -27,0 +27,0 @@ |
2737
45