config.js 462 B

123456789101112131415161718192021
  1. /**
  2. * Created by Hongcai Deng on 2015/12/28.
  3. */
  4. 'use strict';
  5. const path = require('path');
  6. const fs = require('fs');
  7. const defaultConfigJsonPath = path.join(__dirname, '..', 'config-default.json')
  8. const defaultConfigPath = path.join(__dirname, '..', 'config-default.js')
  9. let config = {};
  10. if (fs.existsSync(defaultConfigJsonPath)) {
  11. config = require(defaultConfigJsonPath);
  12. } else {
  13. config = require(defaultConfigPath);
  14. }
  15. module.exports = config;