nails-boilerplate 1.3.0 → 1.3.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/lib/nails.js +2 -1
- package/lib/sequelize_connector.js +2 -1
- package/package.json +1 -1
package/lib/nails.js
CHANGED
|
@@ -20,6 +20,7 @@ import ModelV2 from './model_v2.js';
|
|
|
20
20
|
import Router from './router.js';
|
|
21
21
|
|
|
22
22
|
import express_app from './application.js';
|
|
23
|
+
import DbConnector from './database_connector.js';
|
|
23
24
|
|
|
24
25
|
const models = {};
|
|
25
26
|
|
|
@@ -81,7 +82,7 @@ async function configure( app_config ) {
|
|
|
81
82
|
}
|
|
82
83
|
// TODO: make this Model style mandatory
|
|
83
84
|
console.log("Connecting to DB...");
|
|
84
|
-
if (DBConnector
|
|
85
|
+
if (DBConnector instanceof DbConnector) {
|
|
85
86
|
console.log("Generating model superclass...");
|
|
86
87
|
await DBConnector.connect(app_config.db);
|
|
87
88
|
ModelV2.setConnector(DBConnector);
|