Copyright
Brief Table of Contents
Table of Contents
Foreword
Preface
Acknowledgments
About this Book
About the Cover Illustration
1. Node fundamentals
Chapter 1. Getting started
1.1. Getting to know Node
1.1.1. Why Node?
1.1.2. Node’s main features
1.2. Building a Node application
1.2.1. Creating a new Node project
1.2.2. Making a stream class
1.2.3. Using a stream
1.2.4. Writing a test
1.3. Summary
Chapter 2. Globals: Node’s environment
2.1. Modules
Technique 1 Installing and loading modules
Technique 2 Creating and managing modules
Technique 3 Loading a group of related modules
Technique 4 Working with paths
2.2. Standard I/O and the console object
Technique 5 Reading and writing to standard I/O
Technique 6 Logging messages
Technique 7 Benchmarking a program
2.3. Operating system and command-line integration
Technique 8 Getting platform information
Technique 9 Passing command-line arguments
Technique 10 Exiting a program
Technique 11 Responding to signals
2.4. Delaying execution with timers
Technique 12 Executing functions after a delay with setTimeout
Technique 13 Running callbacks periodically with timers
Technique 14 Safely managing asynchronous APIs
2.5. Summary
Chapter 3. Buffers: Working with bits, bytes, and encodings
3.1. Changing data encodings
Technique 15 Converting buffers into other formats
Technique 16 Changing string encodings using buffers
3.2. Converting binary files to JSON
Technique 17 Using buffers to convert raw data