Skip to content

Instantly share code, notes, and snippets.

var sys = require("sys");
var daemon = require("./daemon");
// Do whatever initialization stuff you need here
daemon.start();
// Your daemon code goes here.
var sys = require("sys");
var daemon = require("./daemon");
// Do whatever initialization stuff you need here
var pid = daemon.start(); //Returns daemons PID
daemon.closeIO(); // Closes stdin, stdout, stderr
process.umask(027); //Change umask
process.chdir("/var/myserver"); //Change working directory
var daemon = require('./daemon');
var sys = require('sys');
var fs = require('fs');
var http = require('http');
var config = {
lockFile: '/tmp/hellohttpd.lock' //Location of lockFile
};
var args = process.argv;
We couldn’t find that file to show.