We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 16caf33 commit e63a83dCopy full SHA for e63a83d
server/src/index.ts
@@ -27,15 +27,16 @@ if (cluster.isPrimary) {
27
// create the workers
28
console.log(`creating ${maxWorkers} workers...`)
29
for (let i = 0; i < maxWorkers; i++) {
30
- cluster.fork();
+ cluster.fork()
31
}
32
33
cluster.on('online', (worker) => {
34
console.log('Worker', worker.id, 'online')
35
})
36
37
- cluster.on("exit", (worker, code, _signal) => {
38
- console.log(`Worker ${worker.id} exited with code ${code}`);
+ cluster.on("exit", (worker, code, signal) => {
+ console.log(`Worker ${worker.id} exited with code ${code} and signal ${signal}`);
39
40
41
console.log('🚀 Server ready at localhost:3000');
42
} else {
0 commit comments