You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
Global-sales/wai-server/config/index.js

17 lines
456 B
JavaScript

'use strict';
require('dotenv').config();
const fs = require('fs');
const path = require('path');
const config = {};
const basePath = path.join(__dirname, 'components');
// Require all the files from the components folder and add the imported to a unique configuration object
fs.readdirSync(basePath).forEach(file => {
const componentConfig = require(path.join(basePath, file));
Object.assign(config, componentConfig);
});
module.exports = config;