Removed Redis & MongoDB dependencies in favor of Loki.js

This commit is contained in:
NGPixel
2016-08-21 23:18:31 -04:00
parent e94abf9466
commit 24f90d4a17
11 changed files with 140 additions and 295 deletions
+35
View File
@@ -0,0 +1,35 @@
"use strict";
var fs = require('fs'),
_ = require('lodash');
/**
* Local Data Storage
*
* @param {Object} appconfig The application configuration
*/
module.exports = (appconfig) => {
// Create DB folder
try {
fs.mkdirSync(appconfig.datadir.db);
} catch (err) {
if(err.code !== 'EEXIST') {
winston.error(err);
process.exit(1);
}
}
// Create Uploads folder
try {
fs.mkdirSync(appconfig.datadir.uploads);
} catch (err) {
if(err.code !== 'EEXIST') {
winston.error(err);
process.exit(1);
}
}
};