Skip to Content
Node Cookbook - Third Edition
book

Node Cookbook - Third Edition

by Matteo Collina, David Mark Clements, Peter Elger, Mathias Buus Madsen
July 2017
Intermediate to advanced
656 pages
16h 1m
English
Packt Publishing
Content preview from Node Cookbook - Third Edition

Fuge's  apply command

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 ...
Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Start your free trial

You might also like

Node Cookbook - Fourth Edition

Node Cookbook - Fourth Edition

Bethany Griggs
Your First Week With Node.js, 2nd Edition

Your First Week With Node.js, 2nd Edition

James Hibbard, Craig Buckler, Mark Brown, Nilson Jacques, James Kolce, Paul Orac, M. David Green, Florian Rappl

Publisher Resources

ISBN: 9781785880087Supplemental Content