Skip to content

Commit

Permalink
config file changed
Browse files Browse the repository at this point in the history
  • Loading branch information
helloyou2012 committed Apr 23, 2016
1 parent 1ce80bc commit 461e0d0
Showing 1 changed file with 12 additions and 0 deletions.
12 changes: 12 additions & 0 deletions src/config.js
Original file line number Diff line number Diff line change
Expand Up @@ -77,5 +77,17 @@ export default function(param) {
merge(_config, param);
}

if (!_config.orm.dialectModulePath) {
let modulePath = join(process.cwd(), 'node_modules');
let moduleName = ({
sqlite: 'sqlite3',
mysql: 'mysql',
mariadb: 'mysql',
postgres: 'pg',
mssql: 'tedious'
})[_config.orm.dialect];

_config.orm.dialectModulePath = require.resolve(join(modulePath, moduleName));
}
return _config;
}

0 comments on commit 461e0d0

Please sign in to comment.