Search icon CANCEL
Subscription
0
Cart icon
Your Cart (0 item)
Close icon
You have no products in your basket yet
Save more on your purchases! discount-offer-chevron-icon
Savings automatically calculated. No voucher code required.
Arrow left icon
Explore Products
Best Sellers
New Releases
Books
Videos
Audiobooks
Learning Hub
Newsletter Hub
Free Learning
Arrow right icon
timer SALE ENDS IN
0 Days
:
00 Hours
:
00 Minutes
:
00 Seconds
Arrow up icon
GO TO TOP
Node Web Development - Second Edition

You're reading from   Node Web Development - Second Edition JavaScript is no longer just for browsers and this exciting introduction to Node.js will show you how to build data-intensive applications that run in real time. Benefit from an easy, step-by-step approach that really works.

Arrow left icon
Product type Paperback
Published in Jul 2013
Publisher
ISBN-13 9781782163305
Length 248 pages
Edition Edition
Tools
Arrow right icon
Author (1):
Arrow left icon
David Herron David Herron
Author Profile Icon David Herron
David Herron
Arrow right icon
View More author details
Toc

Table of Contents (17) Chapters Close

Node Web Development Second Edition
Credits
About the Author
Acknowledgement
About the Reviewers
www.PacktPub.com
Preface
1. About Node FREE CHAPTER 2. Setting up Node 3. Node Modules 4. HTTP Servers and Clients – A Web Application's First Steps 5. Implementing a Simple Express Application 6. Data Storage and Retrieval 7. Multiuser Authorization, Deployment, Scaling, and Hosting 8. Dynamic Interaction between the Client and Server Application 9. Unit Testing Index

Index

A

  • absolute module identifier
    • about / Module identifiers and path names
  • account page, user authentication
    • module, routing for / Routing module for the login, logout, and account pages
  • add function / The notes router
  • af command-line tool / Deploying Notes on cloud hosting (AppFog)
  • af tunnel command / Deploying Notes on cloud hosting (AppFog)
  • af update command / Deploying Notes on cloud hosting (AppFog)
  • algorithm
    • refactoring / Computationally intensive code and the event loop, Algorithmic refactoring
  • app.configure method / Walking through the default Express application
  • app.get function / Walking through the default Express application
  • app.js
    • configuring / Configuring app.js, Configuring app.js, Configuring app.js
    • configuring, for LevelUP / Configuring app.js for LevelUP
    • configuring, for notes / Configuring app.js
    • changes / Changes in app.js
  • app.js file / Launching a server with Node
  • app.js module / Deploying Notes on cloud hosting (AppFog)
  • app.set method / Walking through the default Express application
  • app.use method / Walking through the default Express application
  • AppFog
    • notes, deploying / Deploying Notes on cloud hosting (AppFog)
    • URL / Deploying Notes on cloud hosting (AppFog)
  • application
    • local modules / Local modules within your application
    • external dependencies, bundling / Bundling external dependencies with your application
  • app object / Scaling to use all cores on multi-core servers
  • apt-get update command / Installing Node using package managers
  • assert
    • about / Assert – the simplest testing methodology
  • assert module / Assert – the simplest testing methodology
  • asynchronous code
    • testing / Testing asynchronous code
  • asynchronous event-driven architecture
    • versus versus threaded architecture / Threaded versus asynchronous event-driven architecture
  • async module / Configuring app.js
  • async module / Algorithmic refactoring

B

  • Backbone.js
    • URL / Adding real-time web features to Notes
  • backend service
    • creating / Computationally intensive code and the event loop
  • bin tag / The npm package format

C

  • callback function / Making HTTP Client requests
  • Chocolatey Gallery
    • used, for installing Node on Windows / Installing Node on Windows using Chocolatey Gallery
    • URL / Installing Node on Windows using Chocolatey Gallery
  • client code
    • setting up / Setting up the client code
  • client side code
    • setting up, for sending messages / Setting up client-side code for sending messages
  • cluster module / Scaling to use all cores on multi-core servers
  • commands
    • running / Run a few commands; testing the commands
    • testing / Run a few commands; testing the commands
  • CommonJS modules
    • URL / CommonJS modules
    • about / CommonJS modules
    • module encapsulation, demonstrating / Demonstrating module encapsulation
  • configure function / Asynchronizing the Notes application, Injecting the model configuration into routers, Routing module for the login, logout, and account pages
  • Connect
    • about / Getting started with Express
    • URL / Getting started with Express
  • connect-flash module / Routing module for the login, logout, and account pages
  • connect event / Sending the events from the Notes server
  • connect function / Storing notes in files, Schema setup and model code, Setting up the client code, Data model to store messages
  • connect method / Configuring app.js
  • context / Testing a model
  • cookieParser middleware / Changes in app.js
  • cores
    • using, on multi-core servers / Scaling to use all cores on multi-core servers
  • Create App button / Deploying Notes on cloud hosting (AppFog)
  • Create button / Deploying Notes on cloud hosting (AppFog)
  • create function / Express and the MVC paradigm, The Notes model, The notes router, Model code, Schema setup and model code, Modifying the Notes model to send events
  • createReadStream function / LevelUP model code for Notes
  • CRUD model / Express and the MVC paradigm
  • csh users / Installing from source for all POSIX-like systems
  • curl command / Making HTTP Client requests, Implementing a simple REST server with Express

D

  • data event / Making HTTP Client requests
  • Data model
    • used, to store messages / Data model to store messages
  • data object / Diagnosing a failing test case
  • db.all function / Model code
  • db.each function / Model code
  • db.get function / Model code
  • db.run function / Model code
  • Debian
    • notes, deploying / Deploying Notes on Debian
  • DELETE command / Model code
  • deleteFile.js file / Testing asynchronous code
  • deleteFile function / Testing asynchronous code
  • delete function / Diagnosing a failing test case
  • delmessage event / Socket.IO events for sending messages between users, Dispatching messages between the client- and server-side, Displaying messages to the user
  • delMessage function / Displaying messages to the user
  • DerbyJS
    • URL / Adding real-time web features to Notes
  • destroy function / Express and the MVC paradigm, The notes router, Schema setup and model code, Routing module for the login, logout, and account pages, Modifying the Notes model to send events, Diagnosing a failing test case
  • developer tools
    • installing, on Mac OS X / Installing developer tools on Mac OS X
    • installing from source, for POSIX-like systems / Installing from source for all POSIX-like systems
  • developer tools, installing
    • multiple Node installs, maintaining / Maintaining multiple Node installs simultaneously
  • directories tag / The npm package format
  • disconnect event / Sending the events from the Notes server, Listening to the heartbeat and cleaning up when it stops
  • disconnect function / Storing notes in files
  • doAccount function / Routing module for the login, logout, and account pages
  • docreate flag / Adding a new note (create)
  • docreate parameter / The notes router
  • dodelmessage event / Socket.IO events for sending messages between users, Dispatching messages between the client- and server-side
  • dodestroy function / The notes router
  • doLogin function / Routing module for the login, logout, and account pages
  • doSendMessage function / Setting up client-side code for sending messages
  • duplicate modules
    • eliminating / Eliminating duplicate modules installed beneath node_modules

E

  • .emit function / EventEmitter theory, Initializing Socket.IO with Express
  • edit function / The notes router, Diagnosing a failing test case
  • err object / Diagnosing a failing test case
  • err variable / Testing asynchronous code
  • event
    • receiving, with EventEmitters / Sending and receiving events with EventEmitters
    • sending, with EventEmitters / Sending and receiving events with EventEmitters
    • browser-side event handlers / Browser-side event handlers
  • EventEmitter class / Sending and receiving events with EventEmitters, Sending the events from the Notes server
  • EventEmitter object / Sending and receiving events with EventEmitters
  • EventEmitters
    • about / Sending and receiving events with EventEmitters
    • events, sending / Sending and receiving events with EventEmitters
    • events, receiving / Sending and receiving events with EventEmitters
    • HTTPClient object / Sending and receiving events with EventEmitters
    • HTTPServer object / Sending and receiving events with EventEmitters
    • theory / EventEmitter theory
  • Event Loop
    • about / Computationally intensive code and the event loop
  • events
    • between Notes server and client code / Events between the Notes server and client code
    • notetitles event / Events between the Notes server and client code
    • noteupdated event / Events between the Notes server and client code
    • notedeleted event / Events between the Notes server and client code
    • sending, Notes model modified / Modifying the Notes model to send events
    • sending, from Notes server / Sending the events from the Notes server
  • Everyauth
    • URL / User authentication
  • exports.view function / Diagnosing a failing test case
  • exports object / Defining a module
  • exports variable / Testing a model
  • Express
    • about / Getting started with Express
    • URL / Getting started with Express
    • installing / Getting started with Express
    • Fibonacci sequence, calculating / Calculating the Fibonacci sequence with Express
    • REST service, calling / Calling a REST backend service from an Express application
    • REST server, implementing / Implementing a simple REST server with Express
    • Socket.IO, initializing with / Initializing Socket.IO with Express
  • Express application
    • about / Walking through the default Express application
    • look, changing / Changing the look of an Express application
  • express command / Express and the MVC paradigm, Creating the Notes application code
  • Express command-line tool / Getting started with Express
  • express module / Bundling external dependencies with your application

F

  • Favicon
    • about / HTTP Sniffer – listening to the HTTP conversation
  • Fibonacci application
    • refactoring, for REST / Refactoring the Fibonacci application for REST
  • fibonacci function / Algorithmic refactoring
  • Fibonacci sequence
    • calculating, with Express / Calculating the Fibonacci sequence with Express
    • code, calculating / Computationally intensive code and the event loop
  • fibonum / Calculating the Fibonacci sequence with Express
  • fiboserver.js file / Implementing a simple REST server with Express
  • fibotimes.js file / Computationally intensive code and the event loop
  • files
    • notes, storing / Storing notes in files
  • findAll function / Data model to store messages
  • findAll operation / Schema setup and model code
  • find function / Implementing the Notes model in Mongoose
  • findOne function / Implementing the Notes model in Mongoose
  • find operation / Implementing the Notes model in Mongoose
  • forever tool
    • about / Starting Node servers at system startup, Deploying Notes on Debian
    • URL / Starting Node servers at system startup, Deploying Notes on Debian
  • fs module / Defining a module
  • fs object / Defining a module

G

  • -g flag / npm – the Node package manager, Installing an npm package
  • getmessages event / Socket.IO events for sending messages between users, Dispatching messages between the client- and server-side, Displaying messages to the user
  • getmessages function / Displaying messages to the user
  • GET request / Walking through the default Express application
  • GitHub
    • URL / Deploying Notes on cloud hosting (AppFog)
  • globals / Defining a module

H

  • <h1> tags / Changing the look of an Express application
  • handler function / Threaded versus asynchronous event-driven architecture
  • heartbeat
    • listening to / Listening to the heartbeat and cleaning up when it stops
  • help message / Running a simple script with Node
  • Homebrew
    • Node, installing on Mac OS X / Installing on Mac OS X with Homebrew
    • URL / Installing on Mac OS X with Homebrew
  • homepage tag / Finding npm packages
  • http.createServer function / HTTP server applications
  • http.createServer method / Performance and utilization
  • http.request method / Making HTTP Client requests
  • http.Server object / HTTP server applications
  • HTTPClient object / Sending and receiving events with EventEmitters
  • HTTP Client requests
    • making / Making HTTP Client requests
  • HTTP conversation
    • HTTP Sniffer, listening / HTTP Sniffer – listening to the HTTP conversation
  • HTTP request
    • URL / Some RESTful Node modules
  • HTTP request client
    • URL / Some RESTful Node modules
  • HTTP request system
    • URL / Some RESTful Node modules
  • HTTP server application / HTTP server applications
  • HTTPServer object / Sending and receiving events with EventEmitters
  • HTTP Sniffer
    • listening, to HTTP conversation / HTTP Sniffer – listening to the HTTP conversation

I

  • images directory / Changing the look of an Express application
  • index.ejs template / Asynchronizing the Notes application
  • index.ejs view / Asynchronizing the Notes application
  • index function / Routing module for the login, logout, and account pages
  • init script / Starting Node servers at system startup, Deploying Notes on Debian
  • INSERT INTO command / The Notes model
  • instances
    • multiple, scaling up / Scaling up and running multiple instances
    • multiple, running / Scaling up and running multiple instances
  • Intel's paper
    • URL / Server utilization, the bottom line, and green web hosting

J

  • .json extension / Storing notes in files
  • JavaScript
    • about / Server-side JavaScript, Why should you use Node?
    • disadvantages / Why should you use Node?
    • advantages / Why should you use Node?
  • javascripts directory / Changing the look of an Express application
  • JOIN query / Changes in app.js

K

  • key parameter / Storing notes in files

L

  • launchd script / Starting Node servers at system startup
  • LevelDB
    • URL / Storing notes with the LevelUP data store
  • LevelUP
    • about / Storing notes with the LevelUP data store
    • used, for storing notes / Storing notes with the LevelUP data store
    • URL / Storing notes with the LevelUP data store
    • installing / Installing LevelUP
    • model code, for notes / LevelUP model code for Notes
    • app.js, configuring / Configuring app.js for LevelUP
  • lib directory / The npm package format
  • LinkedIn
    • URL / Performance and utilization
  • Linux
    • node, installing from package management systems / Installing on Linux from package management systems
  • listen function / Launching a server with Node, HTTP server applications, HTTP Sniffer – listening to the HTTP conversation
  • listen method / Performance and utilization
  • local modules / Local modules within your application
  • Local strategy / Changes in app.js
  • location parameter / LevelUP model code for Notes
  • login, user authentication
    • module, routing for / Routing module for the login, logout, and account pages
  • logout, user authentication
    • module, routing for / Routing module for the login, logout, and account pages
  • LSB-style init script
    • URL / Deploying Notes on Debian

M

  • Mac OS X
    • Node, installing with MacPorts / Installing on Mac OS X with MacPorts
    • Node, installing with Homebrew / Installing on Mac OS X with Homebrew
    • developer tools, installing / Installing developer tools on Mac OS X
  • MacPorts
    • project, URL / Installing on Mac OS X with MacPorts
    • Node, installing on Mac OS X / Installing on Mac OS X with MacPorts
  • macro / Testing router functions
  • main tag / The npm package format
  • Makefile file / Making it easy to run the tests
  • messageBox element / Displaying messages to the user
  • messages
    • sending, between users / Sending messages between users
    • sent between users, Socket.IO events used / Socket.IO events for sending messages between users
    • storing, data model used / Data model to store messages
    • sending, client side code setting up / Setting up client-side code for sending messages
    • dispatching, between client-side / Dispatching messages between the client- and server-side
    • dispatching, between server-side / Dispatching messages between the client- and server-side
    • displaying, to user / Displaying messages to the user
    • sending / Running Notes and sending messages
  • method field / Making HTTP Client requests
  • middleware / Web application frameworks
  • Mikito Takada blog
    • URL / Performance and utilization
  • mock-model.js file / Testing router functions
  • mockNext function / Testing router functions
  • mockRes function / Testing router functions
  • mockRes object / Testing router functions
  • model
    • testing / Testing a model
  • model code / Schema setup and model code
  • model configuration
    • injecting, into routers / Injecting the model configuration into routers
  • models directory / Express and the MVC paradigm
  • Model View Controller (MVC) / Web application frameworks
  • module
    • routing, for login / Routing module for the login, logout, and account pages
    • routing, for logout / Routing module for the login, logout, and account pages
    • routing, for account page / Routing module for the login, logout, and account pages
  • module encapsulation
    • demonstrating / Demonstrating module encapsulation
  • module identifier
    • about / Module identifiers and path names
    • relative module identifier / Module identifiers and path names
    • absolute module identifier / Module identifiers and path names
    • top-level module identifier / Module identifiers and path names
  • modules
    • about / Defining a module
    • identifiers / Module identifiers and path names
    • path names / Module identifiers and path names
    • as directories / Complex modules – modules as directories
    • complex modules / Complex modules – modules as directories
  • MongoDB
    • about / Storing notes in MongoDB with Mongoose
    • notes, storing with Mongoose / Storing notes in MongoDB with Mongoose
    • URL / Storing notes in MongoDB with Mongoose
  • mongohosting
    • URL / Storing notes in MongoDB with Mongoose
  • mongohq
    • URL / Storing notes in MongoDB with Mongoose
  • mongolab
    • URL / Storing notes in MongoDB with Mongoose
  • Mongoose
    • about / Storing notes in MongoDB with Mongoose
    • notes, storing in MongoDB / Storing notes in MongoDB with Mongoose
    • URL / Storing notes in MongoDB with Mongoose
    • notes model, implementing / Implementing the Notes model in Mongoose
  • multi-core servers
    • cores, using / Scaling to use all cores on multi-core servers
  • multiple Node installation
    • maintaining / Maintaining multiple Node installs simultaneously
  • MVC
    • about / Express and the MVC paradigm
    • views directory / Express and the MVC paradigm
    • routes directory / Express and the MVC paradigm
  • MySQL button / Deploying Notes on cloud hosting (AppFog)

N

  • newmessage event / Socket.IO events for sending messages between users, Data model to store messages, Dispatching messages between the client- and server-side, Displaying messages to the user
  • next function / Defining a module
  • next object / Testing router functions
  • Node
    • capabilities / The capabilities of Node
    • server-side JavaScript / Server-side JavaScript
    • using / Why should you use Node?
    • architecture / Threaded versus asynchronous event-driven architecture
    • performance / Performance and utilization, Is Node a cancerous scalability disaster?
    • utilization / Performance and utilization
    • performance case study, URL / Performance and utilization
    • server utilization / Server utilization, the bottom line, and green web hosting
    • green web hosting / Server utilization, the bottom line, and green web hosting
    • URL / What's in a name – Node, Node.js, or Node.JS?, Launching a server with Node
    • system requisites / System requirements
    • distribution, installing from nodejs.org / Installing the Node distribution from nodejs.org
    • installing from source, on POSIX-like systems from source / Installing from source on POSIX-like systems
    • installing, URL / Installing from source on POSIX-like systems
    • prerequisites, installing / Installing prerequisites
    • command-line tools / Node's command-line tools
    • simple script, running / Running a simple script with Node
    • server, launching / Launching a server with Node
    • server, starting at system start-up / Starting Node servers at system startup
    • modules / Node modules
    • algorithm, for resolving require('module') / Node's algorithm for resolving require(module)
    • algorithmic refactoring / Computationally intensive code and the event loop
    • backend service, creating / Computationally intensive code and the event loop
  • Node, installing
    • package managers used / Installing Node using package managers
    • on Mac OS X, with MacPorts / Installing on Mac OS X with MacPorts
    • on Mac OS X, with with Homebrew / Installing on Mac OS X with Homebrew
    • on Linux, from package management systems / Installing on Linux from package management systems
    • on Windows, Chocolatey Gallery used / Installing Node on Windows using Chocolatey Gallery
  • node-gyp
    • installation, URL / Installing LevelUP
  • node-gyp project
    • installing, URL / Installing native code modules on Windows
  • node-init
    • URL / Starting Node servers at system startup
    • about / Starting Node servers at system startup
  • node-waf tool / Node's command-line tools
  • node command / Installing the StrongLoop Node distribution, Node's command-line tools, Testing a model
  • Nodefront
    • URL / Maintaining multiple Node installs simultaneously
  • nodejs.org
    • Node distribution, installing / Installing the Node distribution from nodejs.org
  • Node modules
    • about / Some RESTful Node modules
  • nodetitles event function / Browser-side event handlers
  • Node version manager
    • URL / Maintaining multiple Node installs simultaneously
  • NODE_ENV variable / Walking through the default Express application
  • node_modules
    • duplicate modules, eliminating / Eliminating duplicate modules installed beneath node_modules
  • node_modules directory / Module identifiers and path names, Bundling external dependencies with your application, Installing an npm package
  • NODE_PATH variable
    • system-wide modules / System-wide modules in NODE_PATH and elsewhere
    • about / System-wide modules in NODE_PATH and elsewhere
  • notedeleted event / Events between the Notes server and client code, Modifying the Notes model to send events, Sending the events from the Notes server, Browser-side event handlers
  • noteedit.ejs template / Editing an existing note (update)
  • notekey object / Adding a new note (create)
  • notekey parameter / Browser-side event handlers
  • note object / Adding a new note (create), Viewing notes (read), Schema setup and model code
  • Notes
    • model / The Notes model
    • home page / The Notes home page
    • adding / Adding a new note (create)
    • viewing / Viewing notes (read)
    • editing / Editing an existing note (update)
    • deleting / Deleting notes (destroy)
    • real-time web features, adding / Adding real-time web features to Notes
    • running / Running Notes and sending messages
  • notes
    • deploying, on Debian / Deploying Notes on Debian
    • deploying, on AppFog / Deploying Notes on cloud hosting (AppFog)
  • notes, storing
    • in files / Storing notes in files
    • app.js, configuring / Configuring app.js, Configuring app.js, Configuring app.js, Configuring app.js
    • with LevelUP data store / Storing notes with the LevelUP data store
    • LevelUP, installing / Installing LevelUP
    • LevelUP model code, for notes / LevelUP model code for Notes
    • app.js, configuring for LevelUP / Configuring app.js for LevelUP
    • in SQL / Storing notes in SQL – SQLite3
    • schema, setting up with SQLite3 / Setting up a schema with SQLite3
    • model code / Model code
    • with Sequelize module / Storing notes the ORM way with the Sequelize module
    • schema, setup / Schema setup and model code
    • in MongoDB with Mongoose / Storing notes in MongoDB with Mongoose
    • notes model implementation, in Mongoose / Implementing the Notes model in Mongoose
  • notes.destroy / The notes router
  • Notes.sync() function / Schema setup and model code
  • notes.titles function / Asynchronizing the Notes application
  • Notes application
    • code, creating / Creating the Notes application code
    • asynchronizing / Asynchronizing the Notes application
    • running / Running the Notes application
    • running, with Socket.IO / Running the Notes application with Socket.IO
  • Notes application, asynchronizing
    • model configuration, injecting into routers / Injecting the model configuration into routers
    • notes router / The notes router
  • Notes application code, creating
    • Notes model / The Notes model
    • Notes home page / The Notes home page
    • Notes, adding / Adding a new note (create)
    • Notes, viewing / Viewing notes (read)
    • Notes, editing / Editing an existing note (update)
    • Notes, deleting / Deleting notes (destroy)
  • Notes model
    • modifying, to send events / Modifying the Notes model to send events
  • notes model
    • implementing, in Mongoose / Implementing the Notes model in Mongoose
  • notes module / The Notes home page
  • notes router / The notes router
  • Notes server
    • events, sending from / Sending the events from the Notes server
  • notetitles event / Events between the Notes server and client code
  • noteupdated event / Events between the Notes server and client code, Modifying the Notes model to send events, Sending the events from the Notes server, Browser-side event handlers
  • npm
    • about / npm – the Node package manager, Node package manager
    • URL / Getting help with npm
    • configuration settings / npm configuration settings
    • CommonJS modules / CommonJS modules
  • npm command / Installing the StrongLoop Node distribution
    • using / Using the npm commands
    • about / Getting help with npm
    • package information, viewing / Viewing package information
    • native code modules, installing on Windows / Installing native code modules on Windows
    • packages, installing to module / Installing packages local to a module
    • duplicate modules, eliminating / Eliminating duplicate modules installed beneath node_modules
    • installed packages, listing / Listing the currently installed packages
    • outdated packages, updating / Updating outdated packages you've installed
    • installed npm package, uninstalling / Uninstalling an installed npm package
  • npm config set command / npm configuration settings
  • npm get command / npm configuration settings
  • npm init command / Developing and publishing npm packages
  • npm install command / Installing an npm package, Developing and publishing npm packages
  • npm list command / Listing the currently installed packages
  • npm package
    • about / Node package manager
    • format / The npm package format
    • finding / Finding npm packages
    • information, viewing / Viewing package information
    • installing / Installing an npm package
    • installing, to module / Installing packages local to a module
    • installed packages, listing / Listing the currently installed packages
    • scripts / Package scripts
    • installed content, editing / Editing and exploring installed package content
    • installed content, exploring / Editing and exploring installed package content
    • outdated packages, updating / Updating outdated packages you've installed
    • uninstalling / Uninstalling an installed npm package
    • developing / Developing and publishing npm packages
    • publishing / Developing and publishing npm packages
    • version strings / Package version strings and ranges
    • ranges / Package version strings and ranges
  • npm publish command / Developing and publishing npm packages
  • npm repository
    • URL / The npm package format
  • npm set command / npm configuration settings
  • npm unpublish command / Developing and publishing npm packages
  • npm view command / Finding npm packages

O

  • .on function / HTTP Sniffer – listening to the HTTP conversation, Sending the events from the Notes server
  • openid module / Complex modules – modules as directories
  • OpenSSL
    • URL / System requirements
  • options object / Making HTTP Client requests
  • ORM
    • about / Storing notes the ORM way with the Sequelize module

P

  • -prefix option / Maintaining multiple Node installs simultaneously
  • package.json file / Complex modules – modules as directories, The npm package format, Scaling to use all cores on multi-core servers, Making it easy to run the tests
  • package managers
    • used, for installing Node / Installing Node using package managers
    • URL / Installing on Linux from package management systems
  • params.model / Injecting the model configuration into routers
  • Passport
    • URL / User authentication
  • passport-local / Changes in app.js
  • Passport middleware / Changes in app.js
  • passport module / Routing module for the login, logout, and account pages
  • path.join function / Storing notes in files
  • path module / Storing notes in files
  • path names / Module identifiers and path names
  • PATH variable / Installing from source for all POSIX-like systems
  • Percolator.JS
    • URL / Some RESTful Node modules
  • persistent storage
    • Create operation / Express and the MVC paradigm
    • Read operation / Express and the MVC paradigm
    • Update operation / Express and the MVC paradigm
  • POSIX-like systems
    • Node, installing from source / Installing from source on POSIX-like systems, Installing from source for all POSIX-like systems
  • postLogin function / Routing module for the login, logout, and account pages
  • POST operation / Adding a new note (create)
  • public directory
    • about / Changing the look of an Express application
    • images directory / Changing the look of an Express application
    • javascripts directory / Changing the look of an Express application
    • stylesheets directory / Changing the look of an Express application
  • Pulsar class / Sending and receiving events with EventEmitters
  • pulse event / Sending and receiving events with EventEmitters
  • pulser.js file / Sending and receiving events with EventEmitters
  • Pulser object / Sending and receiving events with EventEmitters
  • Python
    • URL / System requirements

Q

  • qs module / Bundling external dependencies with your application
  • query function / Threaded versus asynchronous event-driven architecture

R

  • readdirSync function / Running a simple script with Node
  • read function / Express and the MVC paradigm, Storing notes in files, Implementing the Notes model in Mongoose, Executing the tests
  • readNote function / Routing module for the login, logout, and account pages, Diagnosing a failing test case
  • real-time web features
    • adding, to Notes / Adding real-time web features to Notes
  • redirect function / Testing router functions
  • relative module identifier
    • about / Module identifiers and path names
  • remove function / Implementing the Notes model in Mongoose
  • removeListener function / Sending the events from the Notes server
  • render function / Testing router functions
  • Representational State Transfer (REST) / Making HTTP Client requests
  • req.flash function / Routing module for the login, logout, and account pages
  • req.isAuthenticated function / Routing module for the login, logout, and account pages
  • req.user variable / Routing module for the login, logout, and account pages
  • request.method field / HTTP server applications
  • request.url field / HTTP server applications
  • request event / HTTP server applications
  • request object / HTTP server applications, Testing router functions
  • require function / Defining a module, CommonJS modules
  • require statement / Local modules within your application, The Notes home page, Injecting the model configuration into routers
  • res.render function / Calculating the Fibonacci sequence with Express
  • response object / HTTP server applications, Making HTTP Client requests, Testing router functions
  • REST client library
    • URL / Some RESTful Node modules
  • REST server
    • implementing, with Express / Implementing a simple REST server with Express
    • Fibonacci application, refactoring / Refactoring the Fibonacci application for REST
  • REST service
    • calling, from Express application / Calling a REST backend service from an Express application
  • route middleware / Changes in app.js
  • router functions
    • testing / Testing router functions
  • router module / Routing module for the login, logout, and account pages
  • routers
    • model configuration, injecting / Injecting the model configuration into routers
  • Routers / Web application frameworks
  • routes/notes.js module / Routing module for the login, logout, and account pages
  • routes directory / Express and the MVC paradigm
  • Ruby
    • installer, URL / Deploying Notes on cloud hosting (AppFog)
  • Ryan Dahl
    • URL / Performance and utilization

S

  • .schema command / Setting up a schema with SQLite3
  • <script> tag / Browser-side event handlers
  • save function / Adding a new note (create), The notes router
  • schema
    • setting up, with sqlite3 / Setting up a schema with SQLite3
    • setup / Schema setup and model code
  • script
    • running, with Node / Running a simple script with Node
  • script tag / The npm package format
  • sequelize-based users model / The Sequelize-based users model
  • sequelize-params.js file / Testing a model
  • sequelize-params module / Changes in app.js
  • Sequelize model / Testing router functions
  • Sequelize module
    • notes, storing with / Storing notes the ORM way with the Sequelize module
    • URL / Storing notes the ORM way with the Sequelize module
  • server
    • launching, with Node / Launching a server with Node
  • session middleware / User authentication, Changes in app.js
  • setInterval / Sending and receiving events with EventEmitters
  • setup.js tool / Deploying Notes on cloud hosting (AppFog)
  • setup function / Testing a model
  • ShareJS
    • URL / Adding real-time web features to Notes
  • showerror.ejs template / Asynchronizing the Notes application
  • simple.js module / Defining a module
  • slnode command / Installing the StrongLoop Node distribution
  • Small-scale web applications / Performance and utilization
  • sniffOn function / HTTP Sniffer – listening to the HTTP conversation
  • Socket.IO
    • about / Introducing Socket.IO
    • initializing, with Express / Initializing Socket.IO with Express
    • client code, setting up / Setting up the client code
    • Notes application, running with / Running the Notes application with Socket.IO
  • Socket.IO events
    • used, for sending messages between users / Socket.IO events for sending messages between users
  • socket object / Initializing Socket.IO with Express
  • special versions / Package version strings and ranges
  • SQLite3
    • about / Storing notes in SQL – SQLite3
    • URL / Storing notes in SQL – SQLite3
    • advantages / Storing notes in SQL – SQLite3
    • schema, setting up / Setting up a schema with SQLite3
    • model code / Model code
    • app.js, configuring / Configuring app.js
  • sqlite3 command / Setting up a schema with SQLite3
  • sqlite3 module / Model code
  • sqlite3 package / Setting up a schema with SQLite3
  • start method / Sending and receiving events with EventEmitters
  • start script / Package scripts
  • state / User authentication
  • static file servers / Web application frameworks
  • strategies / Changes in app.js
  • StrongLoop Node
    • about / Installing the StrongLoop Node distribution
    • URL / Installing the StrongLoop Node distribution
    • installing / Installing the StrongLoop Node distribution
  • stylesheets directory / Changing the look of an Express application
  • success function / Schema setup and model code

T

  • test-deleteFile.js file / Testing asynchronous code, Assert – the simplest testing methodology
  • test-model.js file / Testing a model
  • test/setup-model.js script / Testing a model
  • test case
    • diagnosing / Diagnosing a failing test case
  • test driven development (TDD) / Testing a model
  • tests
    • executing / Executing the tests
    • running / Making it easy to run the tests
  • this.callback function / Testing a model
  • threaded architecture
    • versus asynchronous event-driven architecture / Threaded versus asynchronous event-driven architecture
  • title parameter / Storing notes in files
  • titles function / Storing notes in files, LevelUP model code for Notes, Schema setup and model code, Implementing the Notes model in Mongoose
  • top-level module identifier
    • about / Module identifiers and path names
  • topic field / Testing a model
  • tunnel / Deploying Notes on cloud hosting (AppFog)
  • Twitter Bootstrap
    • URL / Changing the look of an Express application

U

  • Ubuntus Upstart tool
    • about / Starting Node servers at system startup
    • URL / Starting Node servers at system startup
  • undefined object / Diagnosing a failing test case
  • unique$ false attribute / Data model to store messages
  • updateAttributes function / Schema setup and model code
  • UPDATE command / The Notes model
  • update function / Express and the MVC paradigm, The Notes model, The notes router, Model code, Implementing the Notes model in Mongoose, Modifying the Notes model to send events
  • updatenote function / Browser-side event handlers
  • USAGE message / Node's command-line tools
  • user.js module / Calculating the Fibonacci sequence with Express
  • user authentication
    • about / User authentication
    • app.js, changes / Changes in app.js
    • sequelize-based users model / The Sequelize-based users model
    • module, routing for login / Routing module for the login, logout, and account pages
    • module, routing for logout / Routing module for the login, logout, and account pages
    • module, routing for account page / Routing module for the login, logout, and account pages
    • user table, initializing / Initializing the user table
    • Notes application, running / Running the Notes application
  • user object / Routing module for the login, logout, and account pages
  • users.ensureAuthenticated function / Changes in app.js, Running the Notes application
  • users module / Changes in app.js
  • user table
    • initializing / Initializing the user table
  • user variable / Routing module for the login, logout, and account pages

V

  • .values function / Demonstrating module encapsulation
  • V8
    • about / Scaling to use all cores on multi-core servers
  • VCAP_APP_PORT environment variable / Deploying Notes on cloud hosting (AppFog)
  • VCAP_SERVICES environment variable / Deploying Notes on cloud hosting (AppFog)
  • view function / Diagnosing a failing test case
  • views/fibonacci.ejs file / Calculating the Fibonacci sequence with Express
  • views directory / Express and the MVC paradigm, Adding a new note (create), Viewing notes (read), Routing module for the login, logout, and account pages
  • vows.describe function / Testing a model
  • Vows framework
    • URL / Testing a model

W

  • Web frameworks
    • about / Web application frameworks
    • URL / Web application frameworks
    • need for / Web application frameworks
  • wget command / Making HTTP Client requests
  • Windows
    • Node installing, Chocolatey Gallery used / Installing Node on Windows using Chocolatey Gallery
    • native code modules, installing / Installing native code modules on Windows
  • workforce.js module / Deploying Notes on cloud hosting (AppFog)
  • workforce module / Scaling to use all cores on multi-core servers
  • WritableStream
    • URL / Making HTTP Client requests

X

  • Xcode
    • URL / Installing developer tools on Mac OS X

Y

  • Yahoo Axis
    • URL / Performance and utilization
  • YSlow
    • URL / Computationally intensive code and the event loop
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