mirror of
https://github.com/marcel-dempers/docker-development-youtube-series.git
synced 2025-06-06 17:01:30 +00:00
fix crashing: await for Promise
This commit is contained in:
parent
c7534eea94
commit
6d7959e025
@ -43,10 +43,10 @@ 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);
|
||||||
console.log(`Running on http://${HOST}:${PORT}`);
|
console.log(`Running on http://${HOST}:${PORT}`);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user