Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
let config = {
enabled: env !== 'production',
server: {}
};
let configPath = path.join(this.root, 'config', 'polly.js');
if (fs.existsSync(configPath)) {
let configGenerator = require(configPath);
Object.assign(config, configGenerator(env));
}
config.server.recordingsDir = path.join(
this.root,
config.server.recordingsDir || Defaults.recordingsDir
);
return config;
},