diff --git a/agent.js b/agent.js index 92b0d38..3906f83 100644 --- a/agent.js +++ b/agent.js @@ -1,5 +1,5 @@ 'use strict'; module.exports = agent => { - require('./lib/loader')(agent); + if (agent.config.sequelize.agent) require('./lib/loader')(agent); }; diff --git a/app.js b/app.js index 1d56502..80dfb1a 100644 --- a/app.js +++ b/app.js @@ -1,6 +1,6 @@ 'use strict'; module.exports = app => { - require('./lib/loader')(app); + if (app.config.sequelize.app) require('./lib/loader')(app); }; diff --git a/config/config.default.js b/config/config.default.js index 8fadc8a..92b429a 100644 --- a/config/config.default.js +++ b/config/config.default.js @@ -1,6 +1,9 @@ 'use strict'; exports.sequelize = { + app: true, + agent: true, + dialect: 'mysql', database: '', host: 'localhost',