diff --git a/index.js b/index.js index ce32e79..4b2fbd7 100644 --- a/index.js +++ b/index.js @@ -29,32 +29,32 @@ if (process.env.CHANGE_TO_DRC == 'YES' || process.env.CHANGE_TO_DRC == 'yes') { } } -if (cluster.isMaster) { - console.log(`Number of CPUs is ${totalCPUs}`); - console.log(`Master ${process.pid} is running`); +// if (cluster.isMaster) { +// console.log(`Number of CPUs is ${totalCPUs}`); +// console.log(`Master ${process.pid} is running`); - // Fork workers. - for (let i = 0; i < totalCPUs; i++) { - cluster.fork(); - } +// // Fork workers. +// for (let i = 0; i < totalCPUs; i++) { +// cluster.fork(); +// } - cluster.on('exit', (worker, code, signal) => { - console.log(`worker ${worker.process.pid} died`); - console.log("Let's fork another worker!"); - cluster.fork(); - }); -} else { - startExpress(); -} +// cluster.on('exit', (worker, code, signal) => { +// console.log(`worker ${worker.process.pid} died`); +// console.log("Let's fork another worker!"); +// cluster.fork(); +// }); +// } else { +// startExpress(); +// } -console.log(`worker pid=${process.pid}`); +// console.log(`worker pid=${process.pid}`); -function startExpress() { - server.listen(PORT, () => { - winston.logger.info( - `Server is running on version ${ - process.env.VERSION - } environment: ${process.env.NODE_ENV.toUpperCase()} port: ${PORT} on ${serverActive}. HSM STATUS : ${serverHSMStatus} ` - ); - }); -} +// function startExpress() { +server.listen(PORT, () => { + winston.logger.info( + `Server is running on version ${ + process.env.VERSION + } environment: ${process.env.NODE_ENV.toUpperCase()} port: ${PORT} on ${serverActive}. HSM STATUS : ${serverHSMStatus} ` + ); +}); +// }