add ls method to list egg runing app
Description of change
pm2 ls
This command can output a table in the shell, list all the running app.
Egg-scripts does not have such a command, this commit add this command, can output a table to list the running egg app.
when install egg-scripts with global, just use eg:
egg-scripts ls
can list all egg runing apps
It can add a title option to filter apps. eg:
egg-scripts ls --title=xxxxx
This will filter the title include xxxx string apps.
Note: egg-scripts is not recommended to install global, you should install and use it as npm scripts. so can add it in npm scripts.
Most of the code is copied from the list function in pm2.
@fengmk2 pm2 code can use in egg?
Codecov Report
Merging #31 into master will decrease coverage by
41.85%. The diff coverage is10.11%.
@@ Coverage Diff @@
## master #31 +/- ##
===========================================
- Coverage 99.51% 57.66% -41.86%
===========================================
Files 6 9 +3
Lines 207 385 +178
===========================================
+ Hits 206 222 +16
- Misses 1 163 +162
| Impacted Files | Coverage Δ | |
|---|---|---|
| index.js | 100% <100%> (ø) |
:arrow_up: |
| lib/cmd/ls.js | 15.38% <15.38%> (ø) |
|
| lib/helper.js | 49.01% <18.75%> (-50.99%) |
:arrow_down: |
| lib/display.js | 4.05% <4.05%> (ø) |
|
| lib/monitor.js | 6.25% <6.25%> (ø) |
|
| lib/cmd/stop.js | 93.33% <0%> (-6.67%) |
:arrow_down: |
Continue to review full report at Codecov.
Legend - Click here to learn more
Δ = absolute <relative> (impact),ø = not affected,? = missing dataPowered by Codecov. Last update c2479dc...e3681ee. Read the comment docs.
ping
@atian25 I’m a bit busy recently, I’ll try to fix the bug this month.
没关系,有时间再改就行,不急。只是顺手 ping 下看看是不是哪里卡住了。