Merge pull request #231 from m-ocean-it/patch-1

fix crashing: await for Promise
This commit is contained in:
marceldempers 2024-09-09 09:04:30 +10:00 committed by GitHub
commit ea497429ac
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -43,10 +43,10 @@ app.get('/', (req, res) => {
// Metrics endpoint
app.get('/metrics', (req, res) => {
app.get('/metrics', async (req, res) => {
res.set('Content-Type', client.register.contentType)
res.end(client.register.metrics())
res.end(await client.register.metrics())
})
app.listen(PORT, HOST);
console.log(`Running on http://${HOST}:${PORT}`);
console.log(`Running on http://${HOST}:${PORT}`);