From fd9c314cbc6e21a0f8a6b09c1f6659133b6c345e Mon Sep 17 00:00:00 2001 From: Peter Johnson Date: Wed, 25 Oct 2017 12:10:58 +0200 Subject: [PATCH] server: fix for CPU detection --- server/http.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/server/http.js b/server/http.js index 6902809d..e50b2b0b 100644 --- a/server/http.js +++ b/server/http.js @@ -28,7 +28,7 @@ const logger = require('pelias-logger').get('placeholder'); // select the amount of cpus we will use const envCpus = parseInt( process.env.CPUS, 10 ); -const cpus = Math.min( Math.max( envCpus, 1 ), os.cpus().length ); +const cpus = Math.min( Math.max( envCpus || Infinity, 1 ), os.cpus().length ); // optionally override port/host using env var var PORT = process.env.PORT || 3000;