Log In
Or create an account ->
Imperial Library
Home
About
News
Upload
Forum
Help
Login/SignUp
Index
Cover
Contents
Part I: Introduction and Setup
Chapter 1: Installing Node
Installing Node on Windows
Installing on Mac OS X
Installing Node Using the Source Code
Setting Up and Using Node Package Manager
Summary
Chapter 2: Introducing Node
Introducing the Event-Driven Programming Style
How Node and JavaScript Make Writing Asynchronous Applications Easier
Summary
Part II: Node Core API Basics
Chapter 3: Loading Modules
Understanding How Node Loads Modules
Exporting a Module
Summary
Chapter 4: Using Buffers to Manipulate, Encode, and Decode Binary Data
Creating a Buffer
Getting and Setting Bytes in a Buffer
Slicing a Buffer
Copying a Buffer
Decoding a Buffer
Summary
Chapter 5: Using the Event Emitter Pattern to Simplify Event Binding
Understanding the Standard Callback Pattern
Understanding the Event Emitter Pattern
Understanding Event Types
Using the Event Emitter API
Creating an Event Emitter
Summary
Chapter 6: Scheduling the Execution of Functions Using Timers
Using setTimeout to Defer the Execution of a Function
Using clearTimeout to Cancel the Execution of a Function
Scheduling and Canceling the Repetitive Execution of a Function
Using process.nextTick to Defer the Execution of a Function Until the Next Event Loop Iteration
Blocking the Event Loop
Escaping the Event Loop
Using setTimeout Instead of setInterval to Force Serialization
Summary
Part III: Files, Processes, Streams, and Networking
Chapter 7: Querying, Reading From, and Writing to Files
Manipulating File Paths
Introducing the fs Module
Opening a File
Reading from a File
Summary
Chapter 8: Creating and Controlling External Processes
Executing External Commands
Spawning Child Processes
Signaling and Killing Processes
Summary
Chapter 9: Reading and Writing Streams of Data
Using a Readable Stream
Using Writable Streams
Considering Some Stream Examples
Avoiding the Slow Client Problem and Saving Your Server
Summary
Chapter 10: Building TCP Servers
Creating a TCP Server
Building a Simple TCP Chat Server
Summary
Chapter 11: Building HTTP Servers
Understanding the http.ServerRequest Object
Understanding the http.ServerResponse Object
Streaming HTTP Chunked Responses
Shutting Down the Server
Example 1: Building a Server that Serves Static Files
Example 2: Making Use of HTTP Chunked Responses and Timers
Summary
Chapter 12: Building a TCP Client
Connecting to a Server
Sending and Receiving Data
Ending the Connection
Handling Errors
Building an Example Command-Line TCP Client
Summary
Chapter 13: Making HTTP Requests
Making GET Requests
Using Other HTTP Verbs
Pooling Sockets Using http.Agent
Using a Third-Party Request Module to Simplify HTTP Requests
Summary
Chapter 14: Using Datagrams (UDP)
Understanding UDP
Understanding the Uses of UDP
Building a Datagram Server
Creating a Simple Datagram Echo Server
Building a Datagram Client
Creating a Simple Datagram Command-Line Client
Understanding and Using Datagram Multicast
Summary
Chapter 15: Securing Your TCP Server With TLS/SSL
Understanding Private and Public Keys
Building a TLS Server
Building a TLS Client
Building Some Examples
Summary
Chapter 16: Securing Your HTTP Server With HTTPS
Building a Secure HTTP Server
Creating an HTTPS Client
Summary
Part IV: Building and Debugging Modules and Applications
Chapter 17: Testing Modules and Applications
Using a Test Runner
Using an Assertion Testing Module
Testing Your Asynchronous Module
Summary
Chapter 18: Debugging Modules and Applications
Using console.log
Using Node’s Built-in Debugger
Using Node Inspector
Summary
Chapter 19: Controlling the Callback Flow
Understanding the Boomerang Effect
Avoiding the Boomerang Effect by Declaring Functions
Using the async Flow Control Library
Summary
Part V: Building Web Applications
Chapter 20: Building and Using HTTP Middleware
Understanding the Connect HTTP Middleware Framework
Building Your Own HTTP Middleware
Using the HTTP Middleware Bundled in Connect
Summary
Chapter 21: Making a Web Application Using Express.js
Initializing Your Express.js Application
Setting Up Middleware in Your Application
Routing Requests
Summary
Chapter 22: Making Universal Real-Time Web Applications Using Socket.io
Understanding How WebSockets Work
Using Socket.IO to Build WebSocket Applications
Summary
Part VI: Connecting to Databases
Chapter 23: Connecting to MYSQL Using node-mysql
Using a Library to Connect to and Communicate with a MySQL Database
Adding Data to the Database with Security Concerns in Mind
Reading Data Efficiently
Summary
Chapter 24: Connecting to CouchDB Using Nano
Installing Nano
Connecting and Creating a Database
Storing Documents
Creating and Using CouchDB Views
Attaching Files to a CouchDB Document
Summary
Chapter 25: Connecting to MongoDB Using MongooSE
Installing Mongoose
Understanding How Mongoose Uses Models to Encapsulate Database Access
Connecting to MongoDB
Defining a Schema
Defining a Model
Summary
Introduction
Advertisements
← Prev
Back
Next →
← Prev
Back
Next →