UNPKG

pm25

Version:

Production process manager for Node.JS applications with a built-in load balancer.

12 lines (10 loc) 303 B
/* * Example of usage : https://github.com/Unitech/pm2/pull/214 */ process.on("message", function (msg) { console.log('got message', msg); if ( "type" in msg && msg.type === "god:heap" ) { var heap = process.memoryUsage().heapUsed; process.send({type:"process:heap", heap:heap}); } });