clearpass-node-extension-sdk
v2.4.8
Published
SDK for building ClearPass extensions with NodeJS.
Downloads
7
Readme
node-extension-sdk
Sample Express Configuration
LABEL \
com.hpe.aruba.clearpass.extension.http.8080="" \
com.hpe.aruba.clearpass.extension.http.8080.description="Extension Statistics" \
if (config.enableStats) {
const statsApp = express();
const statsPort = process.env.STATS_PORT || 8080;
const statsMiddleware = ext.statsMiddleware();
// Add the middleware to both express servers. Otherwise API tracking will not work.
app.use(statsMiddleware);
statsApp.use(statsMiddleware);
statsApp.set('port', statsPort);
log.info('Starting stats web services...');
statsApp.get('/', function (req, res, next) {
res.redirect('stats');
});
const statsServer = statsApp.listen(statsApp.get('port'), () => {
log.info(`Stats server listening on port ${statsServer.address().port}.`);
});
}