From a38fd199b90d27a2405f8cabab0e4f6e45c69b08 Mon Sep 17 00:00:00 2001 From: Robin Monnier Date: Fri, 9 Feb 2018 17:07:13 +0100 Subject: [PATCH 1/2] feat(pm2): add pm2 init option to generate an ecosystem file --- bin/pm2 | 1 + 1 file changed, 1 insertion(+) diff --git a/bin/pm2 b/bin/pm2 index aeb4aa481..699817f6c 100755 --- a/bin/pm2 +++ b/bin/pm2 @@ -665,6 +665,7 @@ commander.command('logrotate') commander.command('ecosystem [mode]') .alias('generate') + .alias('init') .description('generate a process conf file. (mode = null or simple)') .action(function(mode) { pm2.generateSample(mode); From 5d56fac7cc12590af29ee46c68ba32a82a2b813b Mon Sep 17 00:00:00 2001 From: Robin Monnier Date: Fri, 9 Feb 2018 18:26:25 +0100 Subject: [PATCH 2/2] feat(pm2): add pm2 init option to generate an ecosystem file --- README.md | 2 +- bin/pm2 | 1 - test/bash/cli-actions-1.sh | 4 ++-- 3 files changed, 3 insertions(+), 4 deletions(-) diff --git a/README.md b/README.md index 043f4ec31..1ef3279ae 100644 --- a/README.md +++ b/README.md @@ -304,7 +304,7 @@ $ pm2 resurrect # Restore previously saved processes $ pm2 unstartup # Disable and remove startup system $ pm2 update # Save processes, kill PM2 and restore processes -$ pm2 generate # Generate a sample json configuration file +$ pm2 init # Generate a sample js configuration file # Deployment $ pm2 deploy app.json prod setup # Setup "prod" remote server diff --git a/bin/pm2 b/bin/pm2 index 699817f6c..c97798997 100755 --- a/bin/pm2 +++ b/bin/pm2 @@ -664,7 +664,6 @@ commander.command('logrotate') // commander.command('ecosystem [mode]') - .alias('generate') .alias('init') .description('generate a process conf file. (mode = null or simple)') .action(function(mode) { diff --git a/test/bash/cli-actions-1.sh b/test/bash/cli-actions-1.sh index af86c2b95..8d393f527 100644 --- a/test/bash/cli-actions-1.sh +++ b/test/bash/cli-actions-1.sh @@ -125,8 +125,8 @@ spec "Should list processes successfully" $pm2 start multi-echo.json spec "Should start multiple applications" -$pm2 generate echo -spec "Should generate echo sample json" +$pm2 init echo +spec "Should init echo sample json" $pm2 start echo-pm2.json -f spec "Should start echo service"