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'));