Writes the node process' pid to a tasty file for programmtic manipulation
npm install piddler
|1||downloads in the last week|
|2||downloads in the last month|
|Version||1.0.0 last updated a year ago|
|Keywords||pid, linux, script|
A node module that writes the pid of a node process to a file for delicious programmatic mainpulation
Simply require piddler.
var pid = require('piddler');
Then start your app with -P somepath/somefile.pid
node myapp -P /var/log/node/myapp.pid
Piddler will look for a -P flag and, if found, write that processes' id to that file.
int [pid] - on successful write bool false - on unsuccessful write null - if no flag was used to start node app
Smarter people than me from whom I've picked up the rigour of caring enough to control my processes with scripts. You all rock.