1
0
mirror of https://github.com/Unleash/unleash.git synced 2024-10-18 20:09:08 +02:00
unleash.unleash/lib/routes/backstage.js

13 lines
358 B
JavaScript
Raw Normal View History

'use strict';
const prometheusRegister = require('prom-client/lib/register');
module.exports = function (app, config) {
2016-12-04 14:09:37 +01:00
if (config.serverMetrics) {
app.get('/internal-backstage/prometheus', (req, res) => {
res.writeHead(200, { 'Content-Type': 'text/plain' });
res.end(prometheusRegister.metrics());
});
}
};