Нет описания

config.js 458B

123456789101112131415
  1. var path = require('path');
  2. var fs = require('fs');
  3. var settings = {};
  4. try {
  5. var data = fs.readFileSync(path.join(__dirname, '..', 'configs', 'general.json'));
  6. settings.general = JSON.parse(data);
  7. } catch(e) {
  8. console.warn('[warning]', 'No configuration file exists, using default settings.');
  9. var data = fs.readFileSync(path.join(__dirname, '..', 'configs', 'general.json.default'));
  10. settings.general = JSON.parse(data);
  11. }
  12. module.exports = settings;