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

Getting ready

To get started, let's create a new folder called fetching-meta-data, containing a file called meta.js:

$ mkdir fetching-meta-data $ cd fetching-meta-data $ touch meta.js 

Now let's use npm to create package.json file:

$ npm init -y 

We're going to display tabulated and styled metadata in the terminal; instead of manually writing ANSI codes and tabulating code, we'll simply be using the third-party tableaux module.

We can install it like so:

$ npm install --save tableaux 

Finally, we'll create a folder structure that we can check our program against:

$ mkdir -p my-folder/my-subdir/my-subsubdir $ cd my-folder $ touch my-file my-private-file $ chmod 000 my-private-file $ echo "my edit" > my-file $ ln -s my-file my-symlink $ touch ...
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