mirror of
https://github.com/stolksdorf/homebrewery.git
synced 2025-12-21 08:31:29 +00:00
30 lines
647 B
JavaScript
30 lines
647 B
JavaScript
|
|
// initialize config
|
|
const config = require('nconf')
|
|
.argv()
|
|
.env({ lowerCase: true })
|
|
.file('testing', { file: `./config/testing.json` })
|
|
.file('environment', { file: `../config/${process.env.NODE_ENV}.json` })
|
|
.file('defaults', { file: '../config/default.json' });
|
|
|
|
// other libs
|
|
const should = require('chai').use(require('chai-as-promised')).should();
|
|
|
|
|
|
|
|
module.exports = {
|
|
config: config,
|
|
should: should,
|
|
clearCache: () => {
|
|
return new Promise((resolve, reject) => {
|
|
Cache.getRawClientYesIKnowWhatImDoing()
|
|
.flushdb((err) => {
|
|
if (err) {
|
|
return reject(new Error(err));
|
|
}
|
|
resolve();
|
|
});
|
|
});
|
|
},
|
|
};
|