Object #<Object> has no method 'daemonize'
trong opened this issue · comments
trong commented
TypeError: Object # has no method 'daemonize'
Code:
var
config = require('./config').Config,
daemon = require('daemon');
daemon.daemonize({ stdout:config.accessLog, stderr:config.errorLog }, config.pid, function (err, pid) {
if (err) {
return console.error('Error starting daemon: ' + err);
}
console.log('Daemon started successfully with pid: ' + pid);
});
trong commented
version of daemon - 0.5
version of node.js - 0.6.12
AvianFlu commented
Sorry, I broke the API and didn't fix the docs. Things should work for you with daemon.start().
AvianFlu commented
@jesusabdullah graciously re-implemented daemon.daemonize
, although the API has changed a bit. Published in daemon@0.5.1
.