diff --git a/.gitignore b/.gitignore index 9ed71c2..05c16a1 100644 --- a/.gitignore +++ b/.gitignore @@ -1,6 +1,7 @@ # Logs logs *.log +.vscode/ # Runtime data pids diff --git a/app.js b/app.js index a1251b0..cadf23d 100644 --- a/app.js +++ b/app.js @@ -170,10 +170,12 @@ srf.use((req, res, next, err) => { res.send(500); }); -const PORT = process.env.HTTP_PORT || 3000; -const getCount = () => activeCallIds.size; -const healthCheck = require('@jambonz/http-health-check'); -healthCheck({port: PORT, logger, path: '/', fn: getCount}); +if (process.env.K8S) { + const PORT = process.env.HTTP_PORT || 3000; + const getCount = () => activeCallIds.size; + const healthCheck = + healthCheck({port: PORT, logger, path: '/', fn: getCount}); +} /* update call stats periodically */ setInterval(() => {