Book Image

Node.js Blueprints

By : Krasimir Stefanov Tsonev
Book Image

Node.js Blueprints

By: Krasimir Stefanov Tsonev

Overview of this book

Table of Contents (19 chapters)
Node.js Blueprints
Credits
About the Author
About the Reviewers
www.PacktPub.com
Preface
Index

Exploring the required modules


We will use several modules to make our life easier, which are listed as follows:

  • fs: This gives us access to the filesystem, and is a built-in feature of the Node.js module.

  • optimist: This is a module that parses the parameters passed to our Node.js script.

  • readline: This allows the reading of a stream (such as process.stdin) on a line-by-line basis. We will use it for getting input from the user while our application is still running. The module is added in Node.js by default.

  • glob: This module reads a directory and returns all the existing files that match a predefined specific pattern.

  • open: At some point, we will need to open a page in the user's default browser. Node.js runs on different operating systems that have different commands to open the default browser. This module helps us by providing one API.

  • flapi: This is the Flickr API wrapper used to communicate with Flickr's services.

Based on the preceding list, we can write and use the following package...