Answer the question
In order to leave comments, you need to log in
Why is forever needed if there is a Cluster?
Hello! Please tell me how forever differs from this method:
var cluster = require('cluster');
if (cluster.isFork) require('./server');
else {
cluster.on('exit', function () {
console.error('Кирдык. Сервер упал. Поднимаем..');
cluster.fork();
});
cluster.on('fork', function () {
console.log('Сервер запущен и работает!');
});
cluster.fork();
}
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question