mirror of
https://github.com/ION606/archivebot.git
synced 2026-05-14 22:16:56 +00:00
Initial commit
This commit is contained in:
+2
@@ -0,0 +1,2 @@
|
||||
// will exit immediately
|
||||
var daemon = require('../../');
|
||||
+21
@@ -0,0 +1,21 @@
|
||||
var http = require('http');
|
||||
var daemon = require('../../');
|
||||
|
||||
var port = process.argv[2];
|
||||
|
||||
daemon({
|
||||
stdout: process.stdout,
|
||||
stderr: process.stderr
|
||||
});
|
||||
|
||||
var server = http.createServer(function(req, res) {
|
||||
res.end('' + process.pid);
|
||||
});
|
||||
|
||||
server.listen(port);
|
||||
|
||||
// safety, kills process if test framework doesn't
|
||||
setTimeout(function() {
|
||||
process.exit();
|
||||
}, 5000);
|
||||
|
||||
Reference in New Issue
Block a user