Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
const PxClient = require('perimeterx-node-core').PxClient;
class PxExpressClient extends PxClient {
init(config) {
setInterval(() => {
this.submitActivities(config);
}, 1000);
}
}
module.exports = PxExpressClient;
constructor(params) {
params.moduleVersion = MODULE_VERSION;
const pxClient = new PxExpressClient();
this.enforcer = new PxEnforcer(params, pxClient);
if (this.enforcer.config.conf.DYNAMIC_CONFIGURATIONS) {
setInterval(
this.enforcer.config.confManager.loadData.bind(this.enforcer.config.confManager),
this.enforcer.config.conf.CONFIGURATION_LOAD_INTERVAL
);
}
this.middleware = this.newMiddleware();
}