mirror of
https://github.com/Unitech/pm2.git
synced 2025-12-08 20:35:53 +00:00
0.8.13
This commit is contained in:
parent
51569c1696
commit
4e1888ea8a
@ -32,9 +32,9 @@ Works on Linux & MacOS.
|
||||
|
||||
<!-- ### Build Status -->
|
||||
|
||||
<!-- Master: [](https://travis-ci.org/Unitech/pm2) -->
|
||||
Master: [](https://travis-ci.org/Unitech/pm2)
|
||||
|
||||
<!-- Development: [](https://travis-ci.org/Unitech/pm2) -->
|
||||
Development: [](https://travis-ci.org/Unitech/pm2)
|
||||
|
||||
## Monitoring dashboard
|
||||
|
||||
|
||||
7
examples/custom_action.js
Normal file
7
examples/custom_action.js
Normal file
@ -0,0 +1,7 @@
|
||||
|
||||
var axm = require('axm');
|
||||
|
||||
axm.action('refresh:db', function(reply) {
|
||||
console.log('Refreshing');
|
||||
reply({success : true});
|
||||
});
|
||||
22
examples/custom_action_with_params.js
Normal file
22
examples/custom_action_with_params.js
Normal file
@ -0,0 +1,22 @@
|
||||
|
||||
var axm = require('axm');
|
||||
|
||||
axm.action('refresh:db', { comment : 'Refresh the database' }, function(reply) {
|
||||
console.log('Refreshing');
|
||||
reply({success : true});
|
||||
});
|
||||
|
||||
axm.action('chanme:ladb', { comment : 'Refresh la BIG database' }, function(reply) {
|
||||
console.log('Refreshing BIG DB');
|
||||
reply({success : true});
|
||||
});
|
||||
|
||||
axm.action('rm:rf', { comment : 'Delete moi ca plus vite que ca !' }, function(reply) {
|
||||
console.log('RMING RFING');
|
||||
reply({success : true});
|
||||
});
|
||||
|
||||
axm.action('rm:roff', function(reply) {
|
||||
console.log('RMING RFING');
|
||||
reply({success : true});
|
||||
});
|
||||
48
examples/load-me.js
Normal file
48
examples/load-me.js
Normal file
@ -0,0 +1,48 @@
|
||||
|
||||
var stop = false;
|
||||
|
||||
function add(a, b) {
|
||||
while (a.length < b.length) a.unshift(0);
|
||||
while (a.length > b.length) b.unshift(0);
|
||||
var carry = 0, sum = []
|
||||
for (var i = a.length - 1; i >= 0; i--) {
|
||||
var s = a[i] + b[i] + carry;
|
||||
if (s >= 10) {
|
||||
s = s - 10;
|
||||
carry = 1;
|
||||
} else {
|
||||
carry = 0;
|
||||
}
|
||||
sum.unshift(s);
|
||||
}
|
||||
if (carry)
|
||||
sum.unshift(carry);
|
||||
return sum;
|
||||
}
|
||||
|
||||
function fib(n) {
|
||||
var f1 = [0];
|
||||
var f2 = [1];
|
||||
|
||||
while (n--) {
|
||||
var f3 = add(f1, f2)
|
||||
if (stop) return false;
|
||||
f1 = f2;
|
||||
f2 = f3;
|
||||
}
|
||||
return f1.join("");
|
||||
}
|
||||
|
||||
|
||||
var axm = require('axm');
|
||||
|
||||
axm.action('load:start', function(reply) {
|
||||
fib(50000);
|
||||
reply({success : true});
|
||||
});
|
||||
|
||||
|
||||
axm.action('load:stop', function(reply) {
|
||||
stop = true;
|
||||
reply({success : true});
|
||||
});
|
||||
@ -64,9 +64,7 @@
|
||||
"description": "Modern CLI process manager for Node apps with a builtin load-balancer",
|
||||
"main": "index.js",
|
||||
"scripts": {
|
||||
"test": "bash ./test/cli.sh && bash ./test/json_file.sh && bash ./test/harmony.sh && bash ./test/reload.sh && bash ./test/right-exit-code.sh && bash ./test/log-reload.sh && bash ./test/gracefulReload.sh && bash ./test/cli2.sh && bash ./test/misc.sh && bash ./test/watchdog.sh && bash ./test/fork.sh && bash ./test/infinite_loop.sh && NODE_ENV=test ./node_modules/mocha/bin/mocha test",
|
||||
"install" : "node scripts/install.js",
|
||||
"update" : "node scripts/install.js"
|
||||
"test": "bash ./test/cli.sh && bash ./test/json_file.sh && bash ./test/harmony.sh && bash ./test/reload.sh && bash ./test/right-exit-code.sh && bash ./test/log-reload.sh && bash ./test/gracefulReload.sh && bash ./test/cli2.sh && bash ./test/misc.sh && bash ./test/watchdog.sh && bash ./test/fork.sh && bash ./test/infinite_loop.sh && NODE_ENV=test ./node_modules/mocha/bin/mocha test"
|
||||
},
|
||||
"keywords": [
|
||||
"cli",
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user