Socket
Socket
Sign inDemoInstall

pm2

Package Overview
Dependencies
Maintainers
1
Versions
278
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

pm2 - npm Package Compare versions

Comparing version 0.6.5 to 0.6.6

apps/env-pm2.json

3

apps/echo-pm2.json

@@ -9,3 +9,4 @@ {

"exec_mode" : "cluster_mode",
"port" : "9001"
"port" : "9001",
"env_variable" : "TOTO"
}
console.log(process.env.TEST_VARIABLE);
setInterval(function() {
console.log('env TEST_VARIABLE = ', process.env.TEST_VARIABLE);
}, 1000);

@@ -51,6 +51,5 @@

if (appConf['exec_mode'] == 'cluster_mode' &&
process.version.match(/0.10/)) {
console.log(cst.PREFIX_MSG_ERR + ' [Warning], you\'re using the 0.10.x node version, it\'s prefered that you switch to fork mode by adding the -x parameter.');
}
// if (appConf['exec_mode'] == 'cluster_mode' && process.version.match(/0.10/)) {
// console.log(cst.PREFIX_MSG_ERR + ' [Warning], you\'re using the 0.10.x node version, it\'s prefered that you switch to fork mode by adding the -x parameter.');
// }

@@ -57,0 +56,0 @@ // Script arguments

{
"name": "pm2",
"preferGlobal": "true",
"version": "0.6.5",
"version": "0.6.6",
"engines" : {

@@ -11,3 +11,3 @@ "node" : ">=0.8"

"email": "as@unitech.io",
"url": "http://unitech.io"
"url": "http://pm2.io"
},

@@ -14,0 +14,0 @@ "contributors": [{

# ![Monit](https://github.com/unitech/pm2/raw/master/pres/top-logo-wo.png)
pm2 is a process manager for Node apps with a builtin load-balancer.
pm2 is a process manager for Node apps with a builtin load-balancer.
## Tech notes
pm2 is perfect when you need to spread your stateless code accross all CPUs available on a server, to keep all processes alive forever and to 0s reload it.
Good fit for IaaS structures. Don't use it on PaaS solutions (a solution for PaaS will be developed later).
# Main features
- Builtin load-balancer (using the node cluster module)
- Script daemonization
- 0s downtime reload
- Builtin load-balancer
- Startup scripts for Ubuntu and CentOS

@@ -26,7 +31,2 @@ - Stop unstable process (avoid infinite loop)

# Doc
- 0.5.x documentation : [0.5.x](https://github.com/Unitech/pm2/blob/0f0f4261ab21560d54bf39503ff01d4278096240/README.md)
# Readme Contents

@@ -154,4 +154,7 @@

In fork mode all options are the same than the cluster mode (restart, delete...).
But, by the way, you can't cluster natively in fork mode as cluster do (can't use the -i option).
**By using the fork mode you will loose core features of PM2 like the automatic clusterization of your code over all CPUs available and the 0s reload.**
So use it if you only need a forever like behaviour.
Here is how to start your app in fork :

@@ -274,2 +277,5 @@

**Notes**
- every line you add like `"port" : 9005` is present in the process environment
### Special options with JSON process declaration

@@ -313,3 +319,4 @@

- Node 0.10.x doesn't free script port when stopped. It's due to the NodeJS cluster module.
So in order to manage your process with PM2 without problem, you have to use the [fork mode](#a23) instead.
So if you feel that this problem is important for your use case, use the fork mode the [fork mode](#a23) instead.
By using the fork mode you will loose core features of PM2 like the automatic clusterization of your code over all CPUs available and the 0s reload.

@@ -325,2 +332,3 @@ ```

When using the cluster mode (by default) you can't use ports from 0 to 1024. If you really need to exec in this range use the [fork mode](#a23) with the `-x` parameter.
By using the fork mode you will loose core features of PM2 like the automatic clusterization of your code over all CPUs available and the 0s reload.

@@ -327,0 +335,0 @@ <a name="a14"/>

@@ -207,18 +207,2 @@

it('should cron restart', function(done) {
God.prepare({
pm_exec_path : path.resolve(process.cwd(), 'test/fixtures/args.js'),
pm_err_log_path : path.resolve(process.cwd(), 'test/errLog.log'),
pm_out_log_path : path.resolve(process.cwd(), 'test/outLog.log'),
pm_pid_path : path.resolve(process.cwd(), 'test/child'),
args : "['-d', '-a']",
cron_restart : '* * * * * *',
instances : '1'
}, function(err, procs) {
setTimeout(function() {
God.getFormatedProcesses()[0].pm2_env.restart_time.should.be.above(0);
done();
}, 2200);
});
});
});

@@ -225,0 +209,0 @@

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc