Compare commits
2 Commits
master
...
missing-di
Author | SHA1 | Date |
---|---|---|
AJ ONeal | 7c5a0a48ba | |
AJ ONeal | c35d780321 |
|
@ -19,13 +19,13 @@ module.exports.create = function (config={}) {
|
||||||
// they don't, we'll use the baked-in db with its defaults.
|
// they don't, we'll use the baked-in db with its defaults.
|
||||||
Sequelize = require('sequelize');
|
Sequelize = require('sequelize');
|
||||||
if (config.storeDatabaseUrl) {
|
if (config.storeDatabaseUrl) {
|
||||||
sequelize = new Sequelize(config.storeDatabaseUrl, { logging: false });
|
sequelize = new Sequelize(config.storeDatabaseUrl);
|
||||||
} else {
|
} else {
|
||||||
sequelize = new Promise(function (resolve, reject) {
|
sequelize = new Promise(function (resolve, reject) {
|
||||||
confDir = confDir.replace(/~\//, require('os').homedir() + '/');
|
confDir = confDir.replace(/~\//, require('os').homedir() + '/');
|
||||||
mkdirp(confDir, function (err) {
|
mkdirp(confDir, function (err) {
|
||||||
if (err) { reject(err); return; }
|
if (err) { reject(err); return; }
|
||||||
resolve(new Sequelize({ dialect: 'sqlite', storage: confDir + '/db.sqlite3', logging: false }));
|
resolve(new Sequelize({ dialect: 'sqlite', storage: confDir + '/db.sqlite3' }));
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue