We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 3d5f499 commit 62b637cCopy full SHA for 62b637c
index.js
@@ -10,6 +10,19 @@ collectDefaultMetrics({
10
11
const app = express();
12
13
+app.get('/', (req, res) => {
14
+ res.set('Content-Type', 'text/html');
15
+ res.send([
16
+ '<html>',
17
+ '<head><title>NodeJS Prom Exporter</title></head>',
18
+ '<body>',
19
+ '<h1>NodeJS Prom Exporter</h1>',
20
+ '<p><a href="/metrics">Metrics</a></p>',
21
+ '</body>',
22
+ '</html>'
23
+ ].join('\n'));
24
+})
25
+
26
app.get('/metrics', async (_req, res) => {
27
try {
28
res.set('Content-Type', register.contentType);
0 commit comments