egg-scripts icon indicating copy to clipboard operation
egg-scripts copied to clipboard

add ls method to list egg runing app

Open buzai opened this issue 7 years ago • 5 comments

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.

buzai avatar Sep 30 '18 14:09 buzai

@fengmk2 pm2 code can use in egg?

buzai avatar Sep 30 '18 14:09 buzai

Codecov Report

Merging #31 into master will decrease coverage by 41.85%. The diff coverage is 10.11%.

Impacted file tree graph

@@             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 data Powered by Codecov. Last update c2479dc...e3681ee. Read the comment docs.

codecov[bot] avatar Sep 30 '18 16:09 codecov[bot]

ping

atian25 avatar Oct 09 '18 13:10 atian25

@atian25 I’m a bit busy recently, I’ll try to fix the bug this month.

buzai avatar Oct 10 '18 06:10 buzai

没关系,有时间再改就行,不急。只是顺手 ping 下看看是不是哪里卡住了。

atian25 avatar Oct 10 '18 06:10 atian25