From 7c850d1efc0f1334f51d7fc2dc2b5d941f16e3b6 Mon Sep 17 00:00:00 2001 From: fer4github Date: Thu, 25 Apr 2024 10:52:04 +0200 Subject: [PATCH] correccion prometheus --- questionservice/server.js | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/questionservice/server.js b/questionservice/server.js index 90fcfc3..ac6433b 100644 --- a/questionservice/server.js +++ b/questionservice/server.js @@ -8,10 +8,6 @@ const promBundle = require('express-prom-bundle'); const crypto = require('crypto'); -//Prometheus configuration -const metricsMiddleware = promBundle({includeMethod: true}); -app.use(metricsMiddleware); - let corsOptions = { origin: 'http://localhost:8000' }; @@ -21,6 +17,10 @@ let app = express(); app.disable("x-powered-by") //disable default information of express app.use(cors(corsOptions)); +//Prometheus configuration +const metricsMiddleware = promBundle({includeMethod: true}); +app.use(metricsMiddleware); + // Cargamos las consultas SPARQL desde el fichero de configuraciĆ³n const questions = JSON.parse(fs.readFileSync('questions.json', 'utf8'));