What is the difference between worker.kill vs process.exit in Node.JS

317
April 10, 2017, at 11:30 AM

When using Node.js's cluster feature, what is the difference between ending a forked process with process.exit() and worker.kill(), and when should I use each?

My goal here is when the worker finishes its tasks, it should end its process. When the cluster is notified that the worker emits an exit event, it forks a new worker.

Rent Charter Buses Company
READ ALSO
FFmpeg stream dynamic png

FFmpeg stream dynamic png

I would like to know if its possible to stream a png or any kind of image using ffmpegI would like to generate the image contiously using nodejs that updates every 10 seconds

466
Setting up PayPal to run payments for Meteor app

Setting up PayPal to run payments for Meteor app

I have a question: How would I tokenize a credit card number in order to create necessary charges and subscriptions on the server in my Meteor app to be PCI compliant? I'm using Paypal's official paypal-node-sdk package

303
How to escape mysql special characters with sockets.io/node.js/javascript

How to escape mysql special characters with sockets.io/node.js/javascript

I am using socketsio to insert user-generated messages into MySQL, but I'm running into issues inserting records with an apostrophe

553
node js pass variable from loop

node js pass variable from loop

hi I can't pass a variable from another loop into other loop that works for mongodb

341