July 2017
Intermediate to advanced
656 pages
16h 1m
English
The apply command allows us to execute any shell command in every directory of each named service.
This sometimes come in very useful, but it should be used carefully.
We can try this by spinning up the Fuge shell:
$ fuge shell fuge.yml # assuming working dir is micro/fuge
Then, in the shell we can use apply to (for instance) output the directory contents of every registered service:
fuge> apply ls -l [adderservice] total 16 drwxr-xr-x 52 pelger staff 1768 24 Mar 13:33 node_modules -rw-r--r-- 1 pelger staff 313 24 Mar 13:34 package.json -rw-r--r-- 1 pelger staff 399 24 Mar 13:33 service.js [webapp] total 16 -rw-r--r-- 1 pelger staff 1313 24 Mar 13:33 app.js drwxr-xr-x 3 pelger staff 102 24 Mar 13:33 bin drwxr-xr-x ...