Search icon CANCEL
Subscription
0
Cart icon
Your Cart (0 item)
Close icon
You have no products in your basket yet
Arrow left icon
Explore Products
Best Sellers
New Releases
Books
Videos
Audiobooks
Learning Hub
Free Learning
Arrow right icon
Arrow up icon
GO TO TOP
Node Cookbook: Second Edition

You're reading from   Node Cookbook: Second Edition Transferring your JavaScript skills to server-side programming is simplified with this comprehensive cookbook. Each chapter focuses on a different aspect of Node, featuring recipes supported with lots of illustrations, tips, and hints.

Arrow left icon
Product type Paperback
Published in Apr 2014
Publisher Packt
ISBN-13 9781783280438
Length 378 pages
Edition Edition
Languages
Tools
Arrow right icon
Author (1):
Arrow left icon
David Mark Clements David Mark Clements
Author Profile Icon David Mark Clements
David Mark Clements
Arrow right icon
View More author details
Toc

Table of Contents (18) Chapters Close

Node Cookbook Second Edition
Credits
About the Author
About the Reviewers
www.PacktPub.com
Preface
1. Making a Web Server 2. Exploring the HTTP Object FREE CHAPTER 3. Working with Data Serialization 4. Interfacing with Databases 5. Employing Streams 6. Going Real Time 7. Accelerating Development with Express 8. Implementing Security, Encryption, and Authentication 9. Integrating Network Paradigms 10. Writing Your Own Node Modules 11. Taking It Live Index

Index

A

  • Add button / Modifying the mounted login app, Mixins
  • admin user
    • creating / Creating an admin user
    • modifying operations, locking / Locking all modifying operations to an admin user
  • admin_lock variable / Locking all modifying operations to an admin user
  • aggregation
    • about / Indexing and aggregation
  • AJAX
    • browser-server transmission via / Browser-server transmission via AJAX, How to do it…, How it works…, Sending serialized data from the client to the server
  • API
    • extending / Extending a module's API, How to do it…, How it works…, Creating the PUT upload stream example, Merging stat and statStream, Integrating the EventEmitter
  • app
    • deploying, to server environment / Deploying an app to a server environment, Getting ready, How to do it..., How it works..., Using screen instead of nohup, Hosting multiple processes from port 80
  • app.get method / How to do it...
  • app.js file
    • picking apart / Picking apart app.js
  • app.js files
    • configuring / Configuring app.js files
  • app.listen method / How to do it...
  • Application Programmer Interfaces (APIs) / Working with real data – fetching trending tweets
  • apply function / Partial application
  • app mounting
    • about / Understanding app mounting
  • Asterisk
    • URL / Sending an SMS
  • asterisks wildcards
    • defining / Asterisks wildcards
  • Atomicity Consistency Isolation Durability (ACID) / Storing data to CouchDB with Cradle
  • attachments
    • sending / Sending attachments
  • auth-int attribute / How it works...
  • authbind
    • used, for privileged ports / Using authbind for privileged ports
    • URL / Using authbind for privileged ports
  • authenticated areas
    • logging out / Logging out of authenticated areas
  • authenticate function / Logging out of authenticated areas
  • automated phone call
    • making / Making an automated phone call
  • automatic crash recovery
    • about / Automatic crash recovery, How to do it..., How it works..., Detecting a respawn limit violation

B

  • @background property / Playing with colors
  • Base64 encoding
    • URL / Remote Procedure Calls with Socket.IO, How it works...
  • basename property / How to do it...
  • basename variable / How to do it...
  • Basic Authentication
    • implementing / Implementing Basic Authentication, How to do it..., How it works..., Basic Authentication with Express
    • URL / Implementing Basic Authentication
    • with Express / Basic Authentication with Express
    • securing, with SSL/TLS / Securing Basic Authentication with SSL/TLS
  • Benchmarking
    • about / Benchmarking
  • BigCouch
    • CouchDB, scaling with / Scaling CouchDB with BigCouch
    • URL / Scaling CouchDB with BigCouch
  • Binary JSON (BSON) / Updating modifiers, sort, and limit
  • body-parser
    • POST data, accessing with / Accessing POST data with connect and body-parser
    • about / Accessing POST data with connect and body-parser
  • bodyParser method / Accessing POST data with connect and body-parser
  • boundary parameter / Multipart file upload as a client
  • broken downloads
    • resumes, enabling from / Enabling a resume request from broken downloads
  • browser-server transmission
    • via AJAX / Browser-server transmission via AJAX, How to do it…, How it works…, Sending serialized data from the client to the server
  • Browserify
    • installing / WebSocket streams
    • about / WebSocket streams
    • URL / WebSocket streams
  • Buffer.concat method / How it works...
  • Buffer.copy method / How it works...
  • Buffer.slice variable / How it works...
  • Buffer.toString method / How it works…
  • bufferOffset property / How to do it...
  • bufferOffset variable / How it works...
  • bufferSize property / How it works...
  • buffertools.concat function / Processing stream chunk buffers efficiently
  • Buffer variable / How it works...
  • buildStats function / How to do it…, How it works…, How to do it…
  • bytesOut variable / How it works...
  • bytesSent parameter / How it works...

C

  • CA
    • about / Getting ready
  • cache.clean method / Protecting against process memory overruns
  • cache.store function / Protecting against process memory overruns
  • cache.store[f] method / Protecting against process memory overruns
  • cacheAndDeliver function / How it works..., How to do it...
  • cache[f].content property / How it works...
  • callback function / How it works…
  • callback parameter / How it works…
  • call method / Manipulating the CSV data stream, Adding the stat function to the initialized mp3dat object
  • Cancel button / How it works...
  • Can I use
    • URL / Uploading files via PUT
  • Carriage Return Line Feed (CRLF) / Using sendmail as an alternative transport
  • cb function / Constructing JSONP responses, Consuming via the data event
  • cb parameter / How to do it..., How it works...
  • Certificate Signing Request (CSR) / Getting ready
  • Chai
    • URL / Unit tests with should.js
  • changeUser method / How to do it…
  • checkAndSave function / How it works…
  • checkStatus function / How it works...
  • chmod
    • about / How it works...
  • chunk parameter / How it works…
  • chunks property / How to do it...
  • chunk variable / Using read's size argument
  • clean method / Protecting against process memory overruns
  • client
    • multipart data, uploading as / Multipart file upload as a client
  • clientScript variable / How it works...
  • colorMatches function / Processing stream chunk buffers efficiently
  • colors
    • playing with / Playing with colors
  • connect
    • about / Accessing POST data with connect and body-parser
    • POST data, accessing with / Accessing POST data with connect and body-parser
  • Connect
    • about / Picking apart app.js
    • URL / Picking apart app.js
  • connection.query method / How to do it…
  • content caching
    • in memory, for immediate delivery / Caching content in memory for immediate delivery, How to do it..., How it works..., Reflecting content changes
  • content changes
    • reflecting / Reflecting content changes
  • contents property / Sending attachments
  • Continuous deployment
    • about / Continuous deployment, How to do it..., How it works..., Building module dependencies on update, Writing a Node Git hook for integrated testing
  • CORS
    • URL / Security and JSONP
  • CouchDB
    • data, storing with Cradle / Storing data to CouchDB with Cradle, How to do it…, How it works…
    • URL / Getting ready
    • scaling, with BigCouch / Scaling CouchDB with BigCouch
    • data retrieval, with Cradle from / Retrieving data from CouchDB with Cradle, How to do it…, How it works…, Creating an admin user, Locking all modifying operations to an admin user
  • CouchDB changes stream
    • accessing, with Cradle / Accessing the CouchDB changes stream with Cradle, How to do it…, How it works…
  • CouchDB HTTP interface
    • exposing, to remote connections / Exposing the CouchDB HTTP interface to remote connections
  • Cradle
    • used, for storing data to CouchDB / Storing data to CouchDB with Cradle, How to do it…, How it works…
    • used, for retrieving data / Retrieving data from CouchDB with Cradle, How to do it…, How it works…, Creating an admin user, Locking all modifying operations to an admin user
  • Create a new application button / Getting ready
  • createConnection method / How it works…
  • createHash method / How it works...
  • createQuotesView function / How to do it…
  • createServer method / Accessing POST data with connect and body-parser, How it works..., How to do it...
  • createTransport method / How it works...
  • Cross-browser real-time logic
    • used, with Socket.IO / Cross-browser real-time logic with Socket.IO, How to do it..., There's more..., Custom events
  • cross-site request forgery
    • preventing / Preventing cross-site request forgery, How to do it..., How it works..., Auto-securing the POST forms with the CSRF elements, Eliminating cross-site scripting (XSS) vulnerabilities
  • Cross-Site Request Forgery (CSRF) / Preventing cross-site request forgery
  • cross-site scripting attacks
    • eliminating / Eliminating cross-site scripting (XSS) vulnerabilities
  • Cryptographic password hashing
    • about / Hashing passwords, How to do it..., How it works..., Hardened hashing with PBKDF2
    • URL / Hashing passwords
  • CSRF elements
    • POST forms, auto-securing with / Auto-securing the POST forms with the CSRF elements
  • CSS preprocessors
    • used, with Express / CSS preprocessors with Express, How to do it..., How it works..., Nested mixins and rest parameters, Playing with colors, Using LESS
  • CSV
    • about / Writing to a CSV file
  • CSV file
    • writing to / Writing to a CSV file, How it works…, Customizing the CSV elements, Manipulating the CSV data stream
  • ctime property / Reflecting content changes
  • curl
    • URL / How to do it...
  • custom domains
    • assigning, to Nodejitsu apps / Assigning custom domains to Nodejitsu apps
  • custom events
    • about / Custom events
  • custom middleware
    • for site-wide session management / Custom middleware for site-wide session management

D

  • data
    • storing, with MongoDB / Storing and retrieving data with MongoDB, Getting ready, How to do it…, How it works…, Indexing and aggregation, Updating modifiers, sort, and limit, MongoDB without MongoDB
    • retrieving, with MongoDB / Storing and retrieving data with MongoDB, Getting ready, How to do it…, How it works…, Indexing and aggregation, Updating modifiers, sort, and limit, MongoDB without MongoDB
    • storing to CouchDB, with Cradle / Storing data to CouchDB with Cradle, How to do it…, How it works…
    • retrieving from CouchDB, with Cradle / Retrieving data from CouchDB with Cradle, How to do it…, How it works…, Creating an admin user, Locking all modifying operations to an admin user
    • storing, with Redis / Storing and retrieving data with Redis, Getting ready, How it works…, Speeding up the Node Redis module, Overcoming network latency by pipelining commands
    • retrieving, with Redis / Storing and retrieving data with Redis, How it works…, Speeding up the Node Redis module, Overcoming network latency by pipelining commands
  • database
    • provisioning, with jitsu / Provisioning a database with jitsu
  • database bridge
    • creating / Creating a database bridge
  • data event
    • consuming via / Consuming via the data event
  • Data flows
    • about / Data flow
  • db.create method / How it works…
  • debug function / The initialization process
  • decide function / How to do it…, How it works…, Consuming via the data event, How to do it…, How it works…
  • development tool
    • WebSockets, using as / WebSockets as a development tool
  • digest.response property / How it works...
  • Digest Authentication
    • implementing / Implementing Digest Authentication, How to do it..., How it works..., Logging out of authenticated areas
  • digest method / How it works...
  • DNS records, changing
    • with registrar, URL / Receiving e-mails from external SMTP servers
  • Document Object Model (DOM)
    • URL / How it works…
  • download throttling
    • implementing / Implementing download throttling, How to do it..., How it works..., There's more..., Enabling a resume request from broken downloads
  • duplex stream
    • about / Introduction
  • duration object / How it works…
  • duration property / How to do it…
  • dynamic routing
    • implementing / Implementing dynamic routing, How it works..., Optional routes, Asterisks wildcards

E

  • e-mail
    • sending / Sending an e-mail, Getting ready, How to do it..., How it works..., Creating HTML e-mails, Sending attachments
    • receiving, from external SMTP server / Receiving e-mails from external SMTP servers
  • EJS templates
    • about / EJS templates
  • emit method / Custom events
  • encoding parameter / How it works…
  • enctype attribute / Getting ready
  • engine.io
    • about / Cross-browser real-time logic with Socket.IO
    • URL / Cross-browser real-time logic with Socket.IO
  • envelope.to property / How it works...
  • envelope parameter / How it works...
  • err object / Picking apart app.js
  • EventEmitter
    • integrating / Integrating the EventEmitter
  • exist parameter / How it works...
  • exports.stat function / How it works…
  • exports object / How it works…
  • Express
    • CSS preprocessors, using with / CSS preprocessors with Express, How to do it..., How it works..., Nested mixins and rest parameters, Playing with colors, Using LESS
    • Basic Authentication, using with / Basic Authentication with Express
    • HTTPS, enabling in / HTTPS in Express
  • Express framework
    • templating in / Templating in Express, How to do it..., How it works..., EJS templates, Literal JavaScript in Jade, Using layout.jade
  • Express scaffolding
    • generating / Generating Express scaffolding, How to do it..., How it works..., Picking apart app.js, The initialization process
    • initialization process / The initialization process
  • Express web app
    • making / Making an Express web app, Getting ready, Creating a database bridge, Configuring app.js files, Modifying the profiler app, Modifying the mounted login app, Route handling, Views, Mixins, Locals, There's more...
  • external connections
    • Redis, securing from / Securing Redis from external connections
  • external SMTP server
    • e-mail, receiving from / Receiving e-mails from external SMTP servers

F

  • favicon gotcha
    • about / The favicon gotcha
  • feed variable / How to do it…
  • field parameter / How it works...
  • file limits, Unix systems
    • URL / How it works...
  • fileName property / Sending attachments
  • filenames
    • preserving, with formidable / Preserving filenames with formidable
  • file parameter / How it works...
  • files
    • uploading, via PUT / Uploading files via PUT
  • files parameter / Multipart file upload as a client
  • file uploads
    • handling / Handling file uploads, How to do it..., How it works..., There's more..., Uploading files via PUT
  • findBitRate function / How to do it…, How it works…, How to do it…
  • find method / How it works…
  • flash messages
    • about / Flash messages
  • forceLogOut property / Logging out of authenticated areas
  • forEach method / Sending POST requests
  • forever
    • staying up with / Staying up with forever
  • formidable
    • used, to accept POST data / Using formidable to accept all POST data
    • filenames, preserving with / Preserving filenames with formidable
  • from.array method / How it works…
  • from parameter / Custom events
  • fs.exists method / How it works...
  • fs.readFile method / How to do it..., How it works...
  • fs.stat function / Reflecting content changes
  • fs.stat method / Reflecting content changes, How it works..., How to do it…
  • fs.watch method / WebSockets as a development tool
    • URL / WebSockets as a development tool
  • fstats object / How it works…
  • fullname property / How to do it…, How to do it…, How it works…
  • functional module mock-up
    • writing / Writing a functional module mock-up, Getting ready, How to do it…, How it works…, Writing a module use case example

G

  • $.get method / How it works…
  • generateTextFromHtml property / Creating HTML e-mails
  • Github
    • URL / Continuous deployment
  • git pull command / How it works...
  • Google Hot Trends
    • cross referencing, with Twitter tweets / Cross referencing Google Hot Trends with Twitter tweets
  • greater complexity
    • preparing for / Preparing for greater complexity

H

  • handleAbort variable / How it works...
  • handler parameter / Cross referencing Google Hot Trends with Twitter tweets
  • Hang-Up Signal (HUP)
    • about / How it works...
  • hardened hashing
    • with PBKDF2 / Hardened hashing with PBKDF2
  • hash functions
    • URL / How it works...
  • HMAC
    • unique hashes, making with / Making unique hashes with HMAC
  • hotTrends.xmlHandler method / Cross referencing Google Hot Trends with Twitter tweets
  • hours variable / How it works…
  • href attribute / Modifying the mounted login app, Eliminating cross-site scripting (XSS) vulnerabilities
  • HTML e-mails
    • creating / Creating HTML e-mails
  • http.createServer method / How to do it...
  • http.get method / How to do it...
  • http.request method / How to do it..., Sending POST requests
  • HTTP client
    • Node, using as / Using Node as an HTTP client, How to do it..., How it works..., Sending POST requests, Multipart file upload as a client
  • HTTPS
    • enabling, in Express / HTTPS in Express
  • https.Server function / Server Name Indication (SNI)
  • HTTPS web server
    • setting up / Setting up an HTTPS web server, Getting ready, There's more...

I

  • id attribute / Uploading files via PUT
  • include statement / Jade includes
  • INCR command / Preparing for scalability
  • indexing
    • about / Indexing and aggregation
  • inherit method / Making reusable streams
  • initialization process / The initialization process
  • init method / Creating a real-time widget
  • insert method / How it works…
  • inspect method / How to do it...
  • INSTALL button / Introduction
  • integrated testing
    • Node Git hook, writing for / Writing a Node Git hook for integrated testing
  • isUpdated variable / Reflecting content changes
  • ix variable / Processing stream chunk buffers efficiently

J

  • Jade
    • about / How to do it...
    • literal JavaScript, using / Literal JavaScript in Jade
    • include statement / Jade includes
  • jitsu
    • database, provisioning with / Provisioning a database with jitsu
  • JS-Git
    • URL / How it works...
  • JSON
    • object, converting to / Converting an object to JSON and back, How to do it…, How it works…
  • jsonHander method / Cross referencing Google Hot Trends with Twitter tweets
  • jsonHandler method / How to do it…, How it works…
  • JSONP
    • about / Constructing JSONP responses
    • URL / Constructing JSONP responses
  • JSONP responses
    • constructing / Constructing JSONP responses
  • JSONStream
    • URL / WebSocket streams
  • JSONStream.parse function / Chaining and filtering streams

L

  • large file generation
    • URL / Getting ready
  • lastChanged variable / Reflecting content changes
  • layout.jade
    • using / Using layout.jade
  • length property / How it works…
  • LESS
    • using / Using LESS
    • URL / Using LESS
  • limit
    • updating / Updating modifiers, sort, and limit
  • Line Feed (LF) / Using sendmail as an alternative transport
  • Linux Apache MySQL PHP (LAMP) / Connecting and sending SQL to a MySQL server
  • listen method / How it works...
  • literal JavaScript
    • used, in Jade / Literal JavaScript in Jade
  • load function / Sending serialized data from the client to the server
  • locals
    • about / Locals
  • log function / How it works…
  • loop function / How it works...

M

  • --max-old-space-size method / Protecting against process memory overruns
  • Mailinator
    • URL / How to do it...
  • main property / Getting ready
  • makeCall function / How to do it…
  • mappings.sites object / How it works...
  • md5 function / How to do it...
  • message event / How it works...
  • middleware
    • URL / Picking apart app.js
  • middleware method / How it works...
  • mixin keyword / Modifying the profiler app
  • mixins
    • about / Mixins
  • Mocha
    • URL / How to do it…, Writing a Node Git hook for integrated testing
  • modifiers
    • updating / Updating modifiers, sort, and limit
  • modifying operations
    • locking, to admin user / Locking all modifying operations to an admin user
  • module
    • deploying, to npm / Deploying a module to npm, Getting ready, How to do it…, npm link
  • module's request
    • URL / How it works...
  • module's wiki page
    • URL / Node static
  • module dependencies
    • building, on update / Building module dependencies on update
  • MongoDB
    • data, retrieving with / Storing and retrieving data with MongoDB, Getting ready, How to do it…, How it works…, Indexing and aggregation, Updating modifiers, sort, and limit, MongoDB without MongoDB
    • data, storing with / Storing and retrieving data with MongoDB, Getting ready, How to do it…, How it works…, Indexing and aggregation, Updating modifiers, sort, and limit, MongoDB without MongoDB
    • without MongoDB / MongoDB without MongoDB
  • MongoDB server
    • URL / Getting ready
  • mounted login app
    • modifying / Modifying the mounted login app
  • MP3 files
    • URL / Getting ready
  • mp3dat.stat method / How to do it…
  • Mp3dat object / How to do it…
  • mp3dat object
    • stat function, adding to / Adding the stat function to the initialized mp3dat object
  • mp3dat variable / How to do it…
  • MPEG-1 layer 3 file retrieval
    • URL / Getting ready
  • msg parameter / How it works...
  • msg property / Creating a database bridge
  • Msysgit
    • URL / How to do it...
  • multilevel routing
    • about / Simple multilevel routing
  • multi method / Overcoming network latency by pipelining commands
  • multipartAssembler function / Multipart file upload as a client
  • multipart data
    • uploading, as client / Multipart file upload as a client
  • multiple instances
    • allowing / Allowing multiple instances
  • multiple processes
    • hosting, from port 80 / Hosting multiple processes from port 80
  • MX records
    • URL / Receiving e-mails from external SMTP servers
  • MySQL server
    • SQL, sending to / Connecting and sending SQL to a MySQL server, How to do it…, There's more…, Using and cleaning user input, Receiving results from the MySQL server
    • SQL, connecting to / Connecting and sending SQL to a MySQL server, How to do it…, There's more…, Using and cleaning user input, Receiving results from the MySQL server
    • results, receiving from / Receiving results from the MySQL server

N

  • .npmignore
    • about / .npmignore and npm versions
  • NeDB to MongoDB
    • URL / MongoDB without MongoDB
  • nested mixins parameter
    • about / Nested mixins and rest parameters
  • nested mixins rest parameter
    • about / Nested mixins and rest parameters
  • netcat
    • URL / How to do it...
  • network latency
    • overcoming / Overcoming network latency by pipelining commands
  • next parameter / Picking apart app.js
  • ngSMS
    • URL / Sending an SMS
  • no-op function / Modifying the profiler app
  • Node
    • used, as HTTP client / Using Node as an HTTP client, How to do it..., How it works..., Sending POST requests, Multipart file upload as a client
  • Node-based WebSocket client
    • creating / Creating a Node-based WebSocket client
  • Node Git hook
    • writing, for integrated testing / Writing a Node Git hook for integrated testing
  • Node installation
    • URL / Getting ready
    • via package manager, URL / Getting ready
  • Nodejitsu
    • URL / Getting ready
  • Nodejitsu apps
    • custom domains, assigning to / Assigning custom domains to Nodejitsu apps
  • nodemailer
    • using / How to do it...
  • Node processes
    • streaming / Streaming across Node processes, How to do it…, How it works…, Processing stream chunk buffers efficiently, Streaming over TCP
  • Node Redis module
    • speeding up / Speeding up the Node Redis module
  • Node Static
    • about / Node static
  • NodeZoo
    • URL / The routing modules
  • NODE_ENV
    • changing / Changing NODE_ENV permanently
  • nonce attribute / How it works...
  • npm
    • module, deploying to / Deploying a module to npm, Getting ready, How to do it…, npm link
  • npm init command / Getting ready
  • npm install command / How it works...
  • npm link command / npm link
  • npm rebuild command / Building module dependencies on update
  • npm version
    • about / .npmignore and npm versions

O

  • object
    • converting, to JSON / Converting an object to JSON and back, How to do it…, How it works…
    • converting, to XML / Converting an object to XML and back, How to do it…, How it works…, There's more…, Generating XML attributes and text nodes, Partial application
  • Object.create method / Cross referencing Google Hot Trends with Twitter tweets
  • Object Out of Bounds (OOB) / How it works...
  • once method / How to do it...
  • on method / How to do it...
  • optimist module
    • URL / Using and cleaning user input
  • optional routes
    • defining / Optional routes
  • options method / Reading a CSV file
  • other environments
    • setting / Setting other environments
  • other template engines
    • using / Using other template engines
  • output parameter / Sending serialized data from the client to the server

P

  • Paas
    • hosting with / Hosting with a Platform as a Service provider, How to do it..., How it works..., Provisioning a database with jitsu
  • pagenum parameter / Route handling
  • page variable / Views
  • parseAuth function / How it works...
  • parse method / How to do it...
  • parseString function / Partial application
  • parseString method / How it works…
  • parseString variable / Partial application
  • partial application
    • about / Partial application
  • path.basename method / How to do it...
  • pathname property / How to do it...
  • PBKDF2
    • hardened hashing, using with / Hardened hashing with PBKDF2
  • pcap
    • used, to watch TCP traffic / Using pcap to watch TCP traffic
  • performance
    • optimizing, with streaming / Optimizing performance with streaming, How to do it..., How it works..., Protecting against process memory overruns
  • pipe method / Playing with pipes, How it works…
  • pipes
    • playing with / Playing with pipes, How to do it…, Chaining and filtering streams, Preparing for greater complexity
  • pop method / How it works…
  • port
    • forwarding / Port forwarding
  • port 80
    • multiple processes, hosting from / Hosting multiple processes from port 80
  • port property / How it works...
  • POST data
    • processing / Processing POST data, How to do it..., How it works..., Accessing POST data with connect and body-parser
    • accessing, with connect / Accessing POST data with connect and body-parser
    • accessing, with body-parser / Accessing POST data with connect and body-parser
    • accepting, formidable used / Using formidable to accept all POST data
  • postData variable / How to do it...
  • POST forms
    • auto-securing, with CSRF elements / Auto-securing the POST forms with the CSRF elements
  • POST method / How to do it...
  • POST requests
    • sending / Sending POST requests
  • POST server
    • protecting / How to do it...
  • privileged ports
    • authbind, used for / Using authbind for privileged ports
  • process.argv property / How it works...
  • process memory overruns
    • protecting against / Protecting against process memory overruns
  • profile object / How it works...
  • profiler app
    • modifying / Modifying the profiler app
  • profiles.pull method / Route handling
  • profiles variable / How it works…
  • prototypical inheritance
    • refactoring with / Refactoring with prototypical inheritance, Getting ready, How to do it…, How it works…, Adding the stat function to the initialized mp3dat object, Allowing multiple instances
    • about / Refactoring with prototypical inheritance
  • PUBLISH command / How it works…
  • PubSub
    • implementing, with Redis / Implementing PubSub with Redis, How to do it…, There's more…, Securing Redis from external connections
  • push method / How it works…
  • PUT
    • files, uploading via / Uploading files via PUT
  • putty
    • URL / How to do it...
  • PUT upload stream example
    • creating / Creating the PUT upload stream example

Q

  • qop attribute / How it works...
  • query method / How to do it…
  • querystring module
    • parsing / Parsing the querystring module

R

  • randomBytes method / Hardened hashing with PBKDF2
  • rcpt variable / How it works...
  • read's size argument
    • using / Using read's size argument
  • Read-Eval-Print-Loop (REPL) / Accessing POST data with connect and body-parser
  • read method / Using read's size argument, Consuming via the data event
  • readStream method / How to do it...
  • ready variable / How to do it…
  • real-time widget
    • creating / Creating a real-time widget, How to do it..., How it works..., Preparing for scalability, WebSockets as a development tool
  • realm variable / Logging out of authenticated areas
  • Redis
    • data, retrieving with / Storing and retrieving data with Redis, How it works…, Speeding up the Node Redis module, Overcoming network latency by pipelining commands
    • data, storing with / Storing and retrieving data with Redis, Getting ready, How it works…, Speeding up the Node Redis module, Overcoming network latency by pipelining commands
    • securing, from external connections / Securing Redis from external connections
  • Redis authentication
    • about / Redis authentication
  • remote add command / How it works...
  • remote connections
    • CouchDB HTTP interface, exposing to / Exposing the CouchDB HTTP interface to remote connections
  • request module
    • URL / WebSocket streams
  • require function / How it works...
  • res.render method / How to do it..., How it works...
  • res.resume method / Consuming via the data event
  • res.sid function / How it works...
  • respawn limit violation
    • detecting / Detecting a respawn limit violation
  • respawn variable / How it works...
  • response.end method / How it works...
  • response.finished property / How it works...
  • response parameter / How it works…
  • REST architecture
    • URL / Sending an SMS
  • rest parameter
    • about / Nested mixins and rest parameters
  • result parameter / Indexing and aggregation
  • results
    • receiving, from MySQL server / Receiving results from the MySQL server
  • resumes
    • enabling, from broken downloads / Enabling a resume request from broken downloads
  • reusable streams
    • making / Making reusable streams
  • rootName property / How it works…
  • route
    • handling / Route handling
  • router
    • setting up / Setting up a router, Getting ready, How to do it..., How it works..., Simple multilevel routing, The routing modules
  • routes/index.js
    • loading / Looking into routes/index.js
  • route validation
    • about / Route validation
  • routing modules
    • about / The routing modules
  • routing modules, Node
    • URL / The routing modules
  • RPC
    • used, with Socket.IO / Remote Procedure Calls with Socket.IO, How to do it..., How it works..., Remote Procedure Calls with SockJS
    • using, with SockJS / Remote Procedure Calls with SockJS

S

  • --save flag / Using other template engines
  • safeMix function / Modifying the profiler app, Locals
  • scalability
    • preparing for / Preparing for scalability
  • screen
    • using / Using screen instead of nohup
  • scripts.test property / Writing a Node Git hook for integrated testing
  • scripts object / How it works...
  • secureShare function / Server Name Indication (SNI)
  • security risk anti-patterns
    • identifying / Securing against filesystem hacking exploits, How to do it..., Whitelisting, Node static
  • Send button / How to do it..., How to do it...
  • sendfile method / How to do it...
  • sendmail
    • used, as alternative transport / Using sendmail as an alternative transport
  • sendMail method / How it works...
  • sendSms method / How it works...
  • serialized data
    • sending, from client to server / Sending serialized data from the client to the server
  • serve method / How it works...
  • server property / How it works...
  • server tier environments
    • managing / Managing server tier environments, How to do it..., Setting other environments, Changing NODE_ENV permanently
  • session
    • initializing / Initializing and using a session, How to do it..., How it works..., There's more..., Custom middleware for site-wide session management, Flash messages
    • using / Initializing and using a session, How to do it..., How it works..., There's more..., Custom middleware for site-wide session management, Flash messages
  • set command / Changing NODE_ENV permanently
  • setx command / Changing NODE_ENV permanently
  • should.js
    • unit tests, using with / Unit tests with should.js
  • should methods
    • URL / Unit tests with should.js
  • sides parameter / Nested mixins and rest parameters
  • Simple API for XML (SAX) / How it works…
  • Simple Mail Transfer Protocol (SMTP) / Getting ready
  • site-wide session management
    • custom middleware, used for / Custom middleware for site-wide session management
  • size parameter / How it works…
  • size property / How it works...
  • slice method / How it works...
  • SMS
    • sending / Sending an SMS, Getting ready, How to do it..., Making an automated phone call
  • SMTP server
    • creating / Creating an SMTP server, How to do it..., How it works..., Receiving e-mails from external SMTP servers
  • smtp variable / Receiving e-mails from external SMTP servers
  • SNI / Server Name Indication (SNI)
  • Socket.IO
    • Cross-browser real-time logic, using with / Cross-browser real-time logic with Socket.IO, Getting ready, How to do it..., Custom events
    • URL / Cross-browser real-time logic with Socket.IO
    • RPC, using with / Remote Procedure Calls with Socket.IO, How to do it..., How it works..., Remote Procedure Calls with SockJS
  • socket.join method / How it works...
  • socket.send method / How it works...
  • socket parameter / How it works...
  • SockJS
    • about / Remote Procedure Calls with SockJS
    • RPC, using with / Remote Procedure Calls with SockJS
  • sort
    • updating / Updating modifiers, sort, and limit
  • spawnInstance method / Allowing multiple instances
  • SQL
    • connecting, to MySQL server / Connecting and sending SQL to a MySQL server, How to do it…, There's more…, Using and cleaning user input
    • sending, to MySQL server / Connecting and sending SQL to a MySQL server, How to do it…, There's more…, Using and cleaning user input
  • SSH protocol
    • URL / Getting ready
  • SSL/TLS
    • URL / Implementing Basic Authentication
    • Basic Authentication, securing with / Securing Basic Authentication with SSL/TLS
  • start property / How it works...
  • stat
    • and statStream, merging / Merging stat and statStream
  • stat function
    • adding, to initialized mp3dat object / Adding the stat function to the initialized mp3dat object
  • static files
    • serving / Serving static files, How to do it..., How it works...
  • stat method / How to do it…, How it works…, How to do it…, How it works…
  • stats object / How to do it…, How to do it…, Integrating the EventEmitter
  • statStream
    • and stat, merging / Merging stat and statStream
  • statStream method / How to do it…, How it works…, Creating the STDIN stream example
  • STDIN stream example
    • creating / Creating the STDIN stream example
  • store parameter / Making reusable streams
  • stream
    • about / Introduction
  • stream.pipe method / How to do it..., How it works...
  • stream chunk buffers
    • processing / Processing stream chunk buffers efficiently
  • streaming
    • performance, optimizing with / Optimizing performance with streaming, How to do it..., How it works..., Protecting against process memory overruns
  • stream interfaces
    • making / Making stream interfaces, How to do it…, How it works…, Making reusable streams, Transform streams
  • stream property / How it works…
  • streams
    • URL / Introduction
    • consuming / Consuming streams, How to do it…, How it works…, Using read's size argument, Consuming via the data event
    • chaining / Chaining and filtering streams
    • filtering / Chaining and filtering streams
  • streamStat method / Merging stat and statStream
  • String.replace method / How it works…
  • Styles
    • about / Styles
  • subdomain property
    • URL / How it works...
  • superagent
    • URL / How it works...
  • supervisor module
    • URL / Getting ready

T

  • <tr> tag / How it works...
  • TCP
    • streaming over / Streaming over TCP
    • communicating with / Communicating with TCP, How to do it..., How it works..., Port forwarding, Using pcap to watch TCP traffic
  • TCP traffic
    • watching, pcap used / Using pcap to watch TCP traffic
  • TDD
    • URL / Creating a test-driven module specification
  • template engines
    • URL / Templating in Express
  • template engines, comparisons
    • URL / Templating in Express
  • test-driven module specification
    • creating / Creating a test-driven module specification, How to do it…, There's more…, Unit tests with should.js
  • testFile variable / How to do it…
  • text nodes
    • generating / Generating XML attributes and text nodes
  • this object / Integrating the EventEmitter
  • throttle function / How to do it...
  • timeProcessor function / How it works…, How to do it…
  • timestamp property / Protecting against process memory overruns
  • toString method / Making an automated phone call
  • transform function / Manipulating the CSV data stream
  • transform method / Manipulating the CSV data stream
  • transform stream
    • about / Transform streams
  • transport.close method / How it works...
  • trending tweets
    • fetching / Working with real data – fetching trending tweets, Getting ready, How to do it…, How it works…, Cross referencing Google Hot Trends with Twitter tweets
  • trends property / Cross referencing Google Hot Trends with Twitter tweets
  • tweetPath method / Cross referencing Google Hot Trends with Twitter tweets
  • Twilio account
    • URL / Getting ready
  • Twilio dashboard
    • URL / How to do it...
  • Twilio Markup Language (TwiML) / Making an automated phone call
  • Twilio numbers account section
    • URL / How to do it...
  • TwimlResponse method / Making an automated phone call
  • Twitter tweets
    • Google Hot Trends, cross referencing with / Cross referencing Google Hot Trends with Twitter tweets

U

  • Uniform Resource Identifier (URI) / Setting up a router
  • unique hashes
    • making, with HMAC / Making unique hashes with HMAC
  • unit tests
    • used, with should.js / Unit tests with should.js
  • updateProfiles function / Sending serialized data from the client to the server
  • Upstart
    • URL / Getting ready
  • uRealm property / Logging out of authenticated areas
  • uri attribute / How it works...
  • url.parse method / Parsing the querystring module
  • urlOpts variable / Sending POST requests
  • user input
    • using / Using and cleaning user input
    • cleaning / Using and cleaning user input
  • username attribute / How it works...
  • username parameter / Logging out of authenticated areas
  • user property / How it works..., Custom middleware for site-wide session management
  • users variable / Receiving e-mails from external SMTP servers

V

  • validate function / Flash messages
  • validOpts variable / How it works…
  • views
    • about / Views
  • virtual hosting
    • implementing / Implementing a virtual hosting paradigm, How to do it..., How it works..., Virtual hosting Express apps, Server Name Indication (SNI)
    • Express apps / Virtual hosting Express apps
    • SNI / Server Name Indication (SNI)
  • Virtual Private Servers (VPS) / Deploying an app to a server environment
  • visitTag method / Auto-securing the POST forms with the CSRF elements

W

  • WebSockets
    • used, as development tool / WebSockets as a development tool
  • WebSocket server
    • creating / Creating a WebSocket server, How to do it..., How it works..., Creating a Node-based WebSocket client, WebSocket streams
  • WebSocket stream
    • about / WebSocket streams
  • whitelisting
    • about / Whitelisting
  • writable._write method / How it works…
  • writeStream function / How it works...
  • ws module
    • URL / Getting ready

X

  • XML
    • object, converting to / Converting an object to XML and back, How to do it…, How it works…, There's more…, Generating XML attributes and text nodes, Partial application
  • XML attributes
    • generating / Generating XML attributes and text nodes
lock icon The rest of the chapter is locked
arrow left Previous Section
Register for a free Packt account to unlock a world of extra content!
A free Packt account unlocks extra newsletters, articles, discounted offers, and much more. Start advancing your knowledge today.
Unlock this book and the full library FREE for 7 days
Get unlimited access to 7000+ expert-authored eBooks and videos courses covering every tech area you can think of
Renews at €18.99/month. Cancel anytime
Banner background image