1
0
mirror of https://github.com/mgerb/mywebsite synced 2026-01-12 02:42:48 +00:00

updated package.json

This commit is contained in:
2016-01-04 12:25:28 -05:00
parent 3443c97de4
commit 80ca24a715
1168 changed files with 73752 additions and 26424 deletions

View File

@@ -9,7 +9,6 @@
var assert = require('assert'),
path = require('path'),
fs = require('fs'),
spawn = require('child_process').spawn,
vows = require('vows'),
forever = require('../../lib/forever');
@@ -59,4 +58,4 @@ vows.describe('forever/core/startDaemon').addBatch({
}
}
}
}).export(module);
}).export(module);

View File

@@ -1,5 +1,5 @@
/*
* start-stop-relative.js: start or stop forever using relative paths, the script path could be start with './', '../' ...
* start-stop-relative-test.js: start or stop forever using relative paths, the script path could be start with './', '../' ...
*
* (C) 2010 Charlie Robbins & the Contributors
* MIT LICENCE
@@ -9,20 +9,11 @@
var assert = require('assert'),
path = require('path'),
fs = require('fs'),
spawn = require('child_process').spawn,
vows = require('vows'),
forever = require('../../lib/forever');
forever = require('../../lib/forever'),
runCmd = require('../helpers').runCmd;
function runCmd(cmd, args) {
var proc = spawn(process.execPath, [
path.resolve(__dirname, '../../', 'bin/forever'),
cmd
].concat(args), {detached: true});
proc.unref();
}
vows.describe('forever/core/start-stop-peaceful').addBatch({
vows.describe('forever/core/start-stop-relative').addBatch({
"When using forever" : {
"to run script with relative script path" : {
topic: function () {
@@ -57,4 +48,4 @@ vows.describe('forever/core/start-stop-peaceful').addBatch({
}
}
}
}).export(module);
}).export(module);

View File

@@ -7,20 +7,11 @@
*/
var assert = require('assert'),
path = require('path'),
fs = require('fs'),
spawn = require('child_process').spawn,
vows = require('vows'),
forever = require('../../lib/forever');
function runCmd(cmd, args) {
var proc = spawn(process.execPath, [
path.resolve(__dirname, '../../', 'bin/forever'),
cmd
].concat(args), {detached: true});
proc.unref();
return proc;
}
path = require('path'),
fs = require('fs'),
vows = require('vows'),
forever = require('../../lib/forever'),
runCmd = require('../helpers').runCmd;
vows.describe('forever/core/stopbypid-peaceful').addBatch({
"When using forever" : {
@@ -75,4 +66,4 @@ vows.describe('forever/core/stopbypid-peaceful').addBatch({
}
}
}
}).export(module);
}).export(module);

View File

@@ -2,12 +2,12 @@ var util = require('util'),
http = require('http'),
argv = require('optimist').argv;
var port = argv.p || argv.port || 80;
var port = argv.p || argv.port || 8080;
http.createServer(function (req, res) {
console.log(req.method + ' request: ' + req.url);
res.writeHead(200, {'Content-Type': 'text/plain'});
res.write('hello, i know nodejitsu.');
res.write(JSON.stringify(argv));
res.end();
}).listen(port);

View File

@@ -22,12 +22,12 @@ var children = [],
function assertRunning(port, i) {
return {
topic: function () {
request('http://127.0.0.1:' + port, this.callback);
request({ uri: 'http://127.0.0.1:' + port, json: true }, this.callback);
},
"should respond with `i know nodejitsu`": function (err, res, body) {
assert.isNull(err);
assert.equal(res.statusCode, 200);
assert.equal(body, 'hello, i know nodejitsu.');
assert.equal(body.port, port);
},
"stop the child process": function () {
children[i].stop();