indexzero / daemon.node

A node.JS addon that helps to create *nix daemons in Javascript

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Object #<Object> has no method 'daemonize'

trong opened this issue · comments

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);
});

version of daemon - 0.5
version of node.js - 0.6.12

Sorry, I broke the API and didn't fix the docs. Things should work for you with daemon.start().

@jesusabdullah graciously re-implemented daemon.daemonize, although the API has changed a bit. Published in daemon@0.5.1.

@AvianFlu thanks!