From 1848167edab329a12dede5afb1eb7b3709e8c130 Mon Sep 17 00:00:00 2001 From: Christian Kellner Date: Sat, 15 Aug 2020 13:25:17 +0200 Subject: [PATCH] making info api port configurable --- conf/config.example | 1 + lib/api/api.js | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/conf/config.example b/conf/config.example index 1e64c5c..f7588b9 100755 --- a/conf/config.example +++ b/conf/config.example @@ -1,6 +1,7 @@ { "interval": 1, "infoApi": true, + "infoApiPort": 9998, "jobs": { "yourSearchJob": { "notification": { diff --git a/lib/api/api.js b/lib/api/api.js index f222568..e35fe58 100644 --- a/lib/api/api.js +++ b/lib/api/api.js @@ -1,7 +1,7 @@ const bodyParser = require('body-parser'); const config = require('../../conf/config'); const { getLastJobExecution, getLastProviderExecution, getTotalNumberOfListings } = require('../services/store'); -const PORT = 9998; +const PORT = config.infoApiPort || 9998; const service = require('restana')(); const enabled = config.infoApi == null ? false : config.infoApi;