Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
/*
* This little server runs the "expressserver" from the Quota tests using
* the Apigee SPI.
*/
var apigeeQuota = require('volos-quota-apigee');
var config = require('./volos/testconfig/testconfig-apigee');
var server = require('./volos/quota/test/expressserver');
var quota = apigeeQuota.create(config.config);
// Build an Express server using the code from the cache module
var app = server(quota);
app.listen(process.env.PORT || 9002);
if (prox.name !== 'edgemicro-auth' && prodObj[prox.name] === true) acc[prox.base_path] = true;
return acc;
}, basePaths);
}
if (config[productName].useRedis === true ) {
debug('using redis quota');
Quota = QuotaRedis;
}
prodObj.basePaths = basePaths;
prodsObj[productName] = prodObj;
config[productName].request = config.request;
config[productName]['debug'] = debug;
var quota = Quota.create(config[productName]);
quotas[productName] = quota.connectMiddleware().apply(options);
//
quotaManagers[productName] = quota;
debug('created quota for', productName);
});