Finish Your Node App book cover

Master asynchronous Node.js calls

Learn to write programs that work as you intended

Finish Your Node App - Table of Contents

What You Need to Know to Write Your First App

  • Initial User Code
  • Role of Node Programmer
  • System


  • System Calls Initial User Code
  • Waiting For Activity and Calling Registered Functions
  • Pseudo-code of System

Returning Control Back

  • Ways to Return Control Back

Reading Files

  • File Read Program
  • Call Returns Without Results
  • Function Is Called When Results Are In
  • Error Argument

Reading Code

  • Synchronously Called Function
  • Asynchronously Called Function

Visualizing Program Execution

  • Visualizing First Program

Putting Dependent Logic Inside Callback

  • Reading Files
  • Making HTTP Calls

Making Use of Waiting Time

  • Communicating with Network is Slow
  • Worker Threads
  • Making Use of Waiting Time

Bonus: Caring for Other Computations

  • SetImmediate
  • Prime Numbers
  • Prime Numbers with Other Activity

Bonus: Complete System

  • process.nextTick()
  • Complete System