fix crashing: await for Promise

This commit is contained in:
m-ocean-it 2024-08-24 18:29:19 +03:00 committed by GitHub
parent c7534eea94
commit 6d7959e025
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -43,9 +43,9 @@ app.get('/', (req, res) => {
// Metrics endpoint // Metrics endpoint
app.get('/metrics', (req, res) => { app.get('/metrics', async (req, res) => {
res.set('Content-Type', client.register.contentType) res.set('Content-Type', client.register.contentType)
res.end(client.register.metrics()) res.end(await client.register.metrics())
}) })
app.listen(PORT, HOST); app.listen(PORT, HOST);