Book Image

MEAN Web Development

By : Amos Q. Haviv
Book Image

MEAN Web Development

By: Amos Q. Haviv

Overview of this book

The MEAN stack is a collection of the most popular modern tools for web development; it comprises MongoDB, Express, AngularJS, and Node.js. Starting with MEAN core frameworks, this project-based guide will explain the key concepts of each framework, how to set them up properly, and how to use popular modules to connect it all together. By following the real-world examples shown in this tutorial, you will scaffold your MEAN application architecture, add an authentication layer, and develop an MVC structure to support your project development. Finally, you will walk through the different tools and frameworks that will help expedite your daily development cycles. Watch how your application development grows by learning from the only guide that is solely orientated towards building a full, end-to-end, real-time application using the MEAN stack!
Table of Contents (18 chapters)
MEAN Web Development
Credits
About the Author
About the Reviewers
www.PacktPub.com
Preface
Index

Index

A

  • ad hoc queries, MongoDB / MongoDB ad hoc queries
  • after(callback) method / Introducing Mocha
  • afterEach(callback) method / Introducing Mocha
  • AND/OR queries
    • building / Building AND/OR queries
  • angular.bootstrap() method
    • element argument / Manual bootstrap
    • modules argument / Manual bootstrap
    • config argument / Manual bootstrap
  • angular.module() method
    • name argument / Application modules
    • requires argument / Application modules
    • configFN argument / Application modules
    • about / Automatic bootstrap
  • angular global object
    • about / The angular global object
  • AngularJS
    • about / Introducing AngularJS
    • key concepts / Key concepts of AngularJS
    • URL, for core directives / Core directives
    • installing / Installing AngularJS
    • installing, Bower used / Installing AngularJS using Bower
    • configuring / Configuring AngularJS
    • application structure / Structuring an AngularJS application
    • MVC entities / AngularJS MVC entities
    • routing / AngularJS routing
    • services / AngularJS services
    • debugging, with Batarang / Debugging AngularJS with Batarang
  • AngularJS, key concepts
    • core module / The core module of AngularJS
    • modules / AngularJS modules
    • two-way data binding / Two-way data binding
    • dependency injection / Dependency injection
    • AngularJS directives / AngularJS directives
    • AngularJS application bootstrap / Bootstrapping an AngularJS application
  • AngularJS application
    • bootstrapping / Bootstrapping your AngularJS application
    • testing / Testing your AngularJS application
    • testing, with Jasmine / Introducing the Jasmine framework
    • unit tests / AngularJS unit tests
    • E2E tests / AngularJS E2E tests
  • AngularJS application bootstrap
    • about / Bootstrapping an AngularJS application
    • automatic bootstrap / Automatic bootstrap
    • manual bootstrap / Manual bootstrap
  • AngularJS application routes
    • defining / AngularJS application routes
  • AngularJS authentication
    • managing / Managing AngularJS authentication
    • user object, rendering / Rendering the user object
    • Authentication service, adding / Adding the Authentication service
    • Authentication service, using / Using the Authentication service
  • AngularJS components
    • mocking / Mocking AngularJS components
  • AngularJS core directives
    • about / Core directives
    • ng-app directive / Core directives
    • ng-controller directive / Core directives
    • ng-model directive / Core directives
    • ng-show directive / Core directives
    • ng-hide directive / Core directives
    • ng-repeat directive / Core directives
  • AngularJS custom directives
    • about / Custom directives
  • AngularJS custom services
    • URL, for documentation / Creating AngularJS services
  • AngularJS directives
    • about / AngularJS directives
    • AngularJS core directives / Core directives
    • AngularJS custom directives / Custom directives
  • AngularJS in-built services
    • about / AngularJS prebundled services
    • $http / AngularJS prebundled services
    • $resource / AngularJS prebundled services
    • $location / AngularJS prebundled services
    • $q / AngularJS prebundled services
    • $rootScope / AngularJS prebundled services
    • $window / AngularJS prebundled services
    • URL, for documentation / AngularJS prebundled services
  • AngularJS module controller
    • creating / Setting up the AngularJS module controller
    • create method / The create() method of the AngularJS controller
    • read method / The find() and findOne() methods of the AngularJS controller
    • update method / The update() method of the AngularJS controller
    • delete method / The delete() method of the AngularJS controller
  • AngularJS module routes
    • wiring / Wiring the AngularJS module routes
  • AngularJS module service
    • creating / Creating the AngularJS module service
  • AngularJS module views
    • implementing / Implementing the AngularJS module views
    • create view / The create-article view
    • read view / The view-article view
    • edit view / The edit-article view
    • list view / The list-articles view
  • AngularJS MVC module
    • implementing / Implementing the AngularJS MVC module
    • service, creating / Creating the AngularJS module service
    • controller, creating / Setting up the AngularJS module controller
    • views, implementing / Implementing the AngularJS module views
    • routes, wiring / Wiring the AngularJS module routes
  • Angular scenario test runner
    • about / Introducing the Protractor test runner
  • app.listen() method
    • about / Creating your first Express application
  • app.use() method / Connect middleware, Configuring Connect-Flash module, Using Connect-Flash module
    • about / Creating your first Express application
  • app folder, horizontal folder structure
    • about / Horizontal folder structure
    • controllers folder / Horizontal folder structure
    • models folder / Horizontal folder structure
    • routes folder / Horizontal folder structure
    • views folder / Horizontal folder structure
  • application
    • executing, Grunt used / Running your application using Grunt
    • testing, Grunt used / Testing your application using Grunt
    • linting, Grunt used / Linting your application using Grunt
  • application dependencies
    • managing, package.json file used / Managing dependencies using the package.json file
    • installing / Installing the package.json dependencies
  • application folder structure, MVC pattern
    • about / Application folder structure
    • horizontal folder structure / Horizontal folder structure
    • vertical folder structure / Vertical folder structure
    • files naming conventions / File-naming conventions
    • horizontal folder structure, implementing / Implementing the horizontal folder structure
  • application modules
    • about / Application modules
  • application object
    • about / The application, request, and response objects
    • app.set(name, value) method / The application object
    • app.get(name) method / The application object
    • app.engine(ext, callback) method / The application object
    • app.locals method / The application object
    • app.use([path], callback) method / The application object
    • app.VERB(path, [callback...], callback) method / The application object
    • app.route(path).VERB([callback...], callback) method / The application object
    • app.param([name], callback) method / The application object
  • application structure, AngularJS
    • about / Structuring an AngularJS application
  • ArticleSchema
    • Created field / Creating the Mongoose model
    • Title field / Creating the Mongoose model
    • Content field / Creating the Mongoose model
    • Creator reference object / Creating the Mongoose model
  • ArticlesController, services
    • $routeParams / Setting up the AngularJS module controller
    • $location / Setting up the AngularJS module controller
    • Authentication / Setting up the AngularJS module controller
    • Articles / Setting up the AngularJS module controller
  • assertion libraries
    • about / Assertion libraries
  • authenticate() method
    • about / Defining custom instance methods
  • Authentication service
    • adding / Adding the Authentication service
    • using / Using the Authentication service
  • authentication views, Passport
    • creating / Creating the authentication views
  • authorization middleware
    • about / Implementing an authorization middleware
  • automatic bootstrap
    • about / Automatic bootstrap

B

  • .bowerrc configuration file
    • about / Configuring the Bower dependencies manager
  • Batarang
    • AngularJS, debugging with / Debugging AngularJS with Batarang
    • about / Debugging AngularJS with Batarang
    • reference link, for installing / Debugging AngularJS with Batarang
    • using / Using Batarang
    • AngularJS tab / Using Batarang
    • Models tab / Batarang Models
    • Performance tab / Batarang Performance
    • Dependencies tab / Batarang Dependencies
    • Options tab / Batarang options
  • BDD
    • about / TDD, BDD, and unit testing
  • before(callback) method / Introducing Mocha
  • beforeEach() method / Testing the Express model
  • beforeEach(callback) method / Introducing Mocha
  • binaries
    • MongoDB, installing from / Installing MongoDB from binaries
  • Blink
    • about / Debugging Express with node-inspector
  • body-parser module
    • about / Configuring an Express application
  • bodyParser.json() middleware
    • about / Configuring an Express application
  • bodyParser.urlencoded() middleware
    • about / Configuring an Express application
  • bootstrapping, AngularJS application
    • performing / Bootstrapping your AngularJS application
  • Bower
    • about / Meeting the Bower dependencies manager
    • URL / Meeting the Bower dependencies manager
    • configuring / Configuring the Bower dependencies manager
    • used, for installing AngularJS / Installing AngularJS using Bower
  • browser.get() method / Introducing the Protractor test runner
  • BSON format
    • about / The BSON format
    • advantage / The BSON format

C

  • callback function / Developing Node.js web applications
  • chat controller, Socket.io chat
    • creating / Creating the chat controller
  • chat routes, Socket.io chat
    • creating / Adding chat routes
  • chat view, Socket.io chat
    • creating / Creating the chat view
  • child() function
    • about / JavaScript closures
  • client folder, vertical folder structure
    • about / Vertical folder structure
    • config folder / Vertical folder structure
    • controllers folder / Vertical folder structure
    • css folder / Vertical folder structure
    • directives folder / Vertical folder structure
    • filters folder / Vertical folder structure
    • img folder / Vertical folder structure
    • views folder / Vertical folder structure
    • feature1.client.module.js file / Vertical folder structure
  • closures
    • about / JavaScript closures
  • collection documents
    • retrieving / Finding all the collection documents
  • collections, MongoDB / MongoDB collections
  • Comet
    • about / Introducing WebSockets
  • command-line interface (CLI)
    • about / Running Node.js
  • CommonJS
    • about / CommonJS modules
    • modules / CommonJS modules
  • components, CommonJS
    • require() method / CommonJS modules
    • exports object / CommonJS modules
    • module object / CommonJS modules
  • compress() middleware
    • about / Configuring an Express application
  • compression module
    • about / Configuring an Express application
  • config folder, horizontal folder structure
    • about / Horizontal folder structure
    • env folder / Horizontal folder structure
    • config.js file / Horizontal folder structure
    • express.js file / Horizontal folder structure
  • configuration, AngularJS
    • about / Configuring AngularJS
  • configuration, Bower
    • about / Configuring the Bower dependencies manager
  • configuration, Connect-Flash module
    • about / Configuring Connect-Flash module
  • configuration, Express application test environment
    • about / Configuring your test environment
  • configuration, Grunt
    • about / Configuring Grunt
  • configuration, Karma test runner
    • about / Configuring the Karma test runner
  • configuration, node-inspector's grunt task
    • about / Configuring node-inspector's grunt task
  • configuration, Passport
    • about / Configuring Passport
  • configuration, Passport's Facebook strategy
    • about / Configuring Passport's Facebook strategy
  • configuration, Passport's Google strategy
    • about / Configuring Passport's Google strategy
  • configuration, Passport's Twitter strategy
    • about / Configuring Passport's Twitter strategy
  • configuration, Passport local strategy
    • about / Configuring Passport's local strategy
  • configuration, protractor test runner
    • about / Configuring the Protractor test runner
  • configuration, Socket.io session
    • about / Configuring the Socket.io session, Configuring the Socket.io session
    • connect-mongo module, installing / Installing the connect-mongo and cookie-parser modules
    • cookie-parser module, installing / Installing the connect-mongo and cookie-parser modules
    • connect-mongo module, configuring / Configuring the connect-mongo module
  • configuration, URL scheme
    • about / Configuring the URL scheme
  • configuration middleware, Socket.io server object / The Socket.io configuration middleware
  • configuration system, Express application
    • about / Configuring an Express application
    • environment configuration files / Environment configuration files
  • Connect-Flash module
    • about / Displaying flash error messages
    • installing / Installing the Connect-Flash module
    • configuring / Configuring Connect-Flash module
    • using / Using Connect-Flash module
  • connect-mongo module
    • installing / Installing the connect-mongo and cookie-parser modules
    • configuring / Configuring the connect-mongo module
  • Connect middleware
    • about / Connect middleware
    • req argument / Connect middleware
    • res argument / Connect middleware
    • next argument / Connect middleware
    • ordering / Understanding the order of Connect middleware
    • mounting / Mounting Connect middleware
  • Connect module
    • about / Meet the Connect module
    • Connect middleware / Connect middleware
  • Connect wiki page
    • URL / External middleware
  • console.log() method / Meet the Connect module
  • Controller
    • about / Three-tier web application development
  • controllers, AngularJS
    • about / AngularJS controllers and scopes
  • cookie-parser module
    • installing / Installing the connect-mongo and cookie-parser modules
  • core module, AngularJS
    • about / The core module of AngularJS
    • angular global object / The angular global object
  • core modules
    • about / Node.js core modules
    • URL, for documentation / Node.js core modules
  • create() method / Creating new users using save(), The create() method of the Express controller, The create() method of the AngularJS controller
  • create-article view
    • about / The create-article view
  • createServer() method / Developing Node.js web applications
  • CRUD modules
    • about / Introducing CRUD modules
    • Express components, setting / Setting up the Express components
    • AngularJS MVC module, implementing / Implementing the AngularJS MVC module
    • implementing / Finalizing your module implementation
  • custom getter modifiers
    • about / Custom getter modifiers
  • custom setter modifiers
    • about / Custom setter modifiers
  • custom validators
    • about / Custom validators

D

  • --dbpath command-line flag / Installing MongoDB on Windows
  • databases, MongoDB / MongoDB databases
  • DBRef
    • about / Using Mongoose DBRef
    • using / Using Mongoose DBRef
    • URL / Using Mongoose DBRef
  • debug grunt task, node-inspector
    • running / Running the debug grunt task
  • delete() method / Deleting an existing user document, The delete() method of the Express controller, The delete() method of the AngularJS controller
  • Dependencies tab, Batarang
    • about / Batarang Dependencies
  • dependency injection
    • about / Dependency injection
    • working with / Dependency injection in AngularJS
  • describe() method / Testing the Express model
  • describe(description, callback) method / Introducing Mocha
  • dispatcher object / Meet the Connect module
  • document
    • creating, insert() method used / Creating a document using insert()
    • creating, update() method used / Creating a document using update()
    • creating, save() method used / Creating a document using save()
  • document-based databases
    • versus relational databases / Introduction to NoSQL
  • documents
    • updating, update() method used / Updating documents using update()
    • updating, save() method used / Updating documents using save()
    • deleting / Deleting all documents
  • drop() method / Deleting all documents

E

  • E2E tests
    • about / Introducing JavaScript testing
  • E2E tests, AngularJS application
    • about / AngularJS E2E tests
    • Protractor test runner / Introducing the Protractor test runner
    • Protractor test runner, installing / Installing the Protractor test runner
    • Protractor test runner, configuring / Configuring the Protractor test runner
    • writing / Writing your first E2E test
    • executing / Running your AngularJS E2E tests
  • edit-article view
    • about / The edit-article view
  • EJS views
    • rendering / Rendering EJS views
  • emit() method / Handling events
  • end() method / Developing Node.js web applications
  • equality statement
    • using / Using an equality statement
  • error handling method
    • creating / The error handling method of the Express controller
  • event handlers, Socket.io chat
    • setting up / Setting the event handlers of the chat server
  • existing documents
    • updating / Updating existing documents
  • expect() method
    • about / Introducing SuperTest
  • Express
    • about / Introduction to Express
    • installing / Installing Express
    • application object / The application object
    • request object / The request object
    • response object / The response object
    • debugging, with node-inspector / Debugging Express with node-inspector
  • express-session module
    • installing / Configuring sessions
  • express.js file
    • about / Adding the routing file
  • express.static() middleware
    • about / Serving static files
  • Express application
    • creating / Creating your first Express application
    • executing / Creating your first Express application
    • configuration system / Configuring an Express application
    • configuring / Configuring the Express application
    • testing / Testing your Express application
    • testing, with Mocha / Introducing Mocha
    • testing, with Should.js / Introducing Should.js
    • testing, with SuperTest / Introducing SuperTest
    • test environment, configuring / Configuring your test environment
    • Mocha test, writing / Writing your first Mocha test
  • Express components
    • setting / Setting up the Express components
    • Mongoose model, creating / Creating the Mongoose model
    • Express controller, setting / Setting up the Express controller
    • Express routes, setting / Wiring the Express routes
    • Express application, configuring / Configuring the Express application
  • Express controller
    • creating / Implementing the horizontal folder structure
    • setting / Setting up the Express controller
    • error handling method / The error handling method of the Express controller
    • create() method / The create() method of the Express controller
    • list() method / The list() method of the Express controller
    • read() method / The read() middleware of the Express controller
    • update() method / The update() method of the Express controller
    • delete() method / The delete() method of the Express controller
    • users controller authentication middleware / Implementing an authentication middleware
    • authorization middleware / Implementing an authorization middleware
  • Express framework
    • MVC pattern, implementing / Implementing the MVC pattern
  • Express middleware
    • about / External middleware
    • Morgan / External middleware
    • body-parser / External middleware
    • method-override / External middleware
    • Compression / External middleware
    • express.static / External middleware
    • cookie-parser / External middleware
    • Session / External middleware
    • URL / External middleware
  • Express routes
    • setting / Wiring the Express routes
  • Express view system
    • configuring / Configuring the view system
  • Express web framework
    • about / Introduction to Express
  • external modules
    • about / External modules

F

  • Facebook's developer
    • URL / Configuring Passport's Facebook strategy
  • factory method / Creating AngularJS services
  • failureFlash property / Wiring the user's routes
  • failureRedirect property / Wiring the user's routes
  • file changes
    • monitoring, Grunt used / Watching file changes using Grunt
  • file modules
    • about / Node.js file modules
  • files naming conventions, MVC pattern
    • about / File-naming conventions
  • find() method
    • about / Reading documents
    • used, for searching multiple user documents / Finding multiple user documents using find()
    • used, for querying users / Advanced querying using find()
    • Query parameter / Advanced querying using find()
    • [Fields] parameter / Advanced querying using find()
    • [Options] parameter / Advanced querying using find()
    • [Callback] parameter / Advanced querying using find()
    / The find() and findOne() methods of the AngularJS controller
  • findByIdAndRemove() method / Deleting an existing user document
  • findByIdAndUpdate() method / Updating an existing user document
  • findOne() method
    • used, for reading single user document / Reading a single user document using findOne()
    / The find() and findOne() methods of the AngularJS controller
  • findOneAndRemove() method / Deleting an existing user document
  • findOneAndUpdate() method / Updating an existing user document
  • first-in-first-out (FIFO) / Understanding the order of Connect middleware
  • folder modules
    • about / Node.js folder modules
  • fs.readFile() method
    • about / Node.js core modules

G

  • get() method / The find() and findOne() methods of the AngularJS controller
  • getErrorMessage() method / Modifying the user controller, The error handling method of the Express controller
  • Google developers
    • URL / Configuring Passport's Google strategy
  • Grunt
    • configuring / Configuring Grunt
    • URL, for configuration / Configuring Grunt
    • used, for executing application / Running your application using Grunt
    • used, for testing application / Testing your application using Grunt
    • used, for linting application / Linting your application using Grunt
    • used, for monitoring file changes / Watching file changes using Grunt
    • URL / Watching file changes using Grunt
  • grunt-concurrent module
    • installing / Watching file changes using Grunt
  • grunt-contrib-csslint module
    • installing / Linting your application using Grunt
  • grunt-contrib-jshint module
    • installing / Linting your application using Grunt
  • grunt-contrib-watch module
    • installing / Watching file changes using Grunt
  • grunt-env task / Installing the Grunt task runner
  • grunt-karma module
    • installing / Testing your application using Grunt
  • grunt-mocha-test module
    • installing / Testing your application using Grunt
  • grunt-nodemon module
    • installing / Running your application using Grunt
  • grunt-protractor-runner module
    • installing / Testing your application using Grunt
  • grunt.initConfig() method / Configuring Grunt
  • grunt.loadNpmTasks() method / Configuring Grunt
  • grunt.registerTask() method / Configuring Grunt
  • grunt task, node-inspector
    • installing / Installing node-inspector's grunt task
    • configuring / Configuring node-inspector's grunt task
  • Grunt task runner
    • about / Introducing the Grunt task runner
    • installing / Installing the Grunt task runner
    • Grunt, configuring / Configuring Grunt

H

  • $http service
    • about / Introducing the ngResource module
  • handshaking process, Socket.io server object / Socket.io handshaking
  • hasAuthorization() middleware
    • about / Implementing an authorization middleware
  • Hashbangs scheme
    • about / Configuring the URL scheme
  • hasName() middleware
    • about / Handling request routing
  • horizontal folder structure, MVC pattern
    • about / Horizontal folder structure
    • app folder / Horizontal folder structure
    • config folder / Horizontal folder structure
    • public folder / Horizontal folder structure
    • package.json file / Horizontal folder structure
    • server.js file / Horizontal folder structure
    • implementing / Implementing the horizontal folder structure
    • request routing, handling / Handling request routing
    • routing file, creating / Adding the routing file
  • horizontal scaling
    • about / MongoDB sharding
  • http module / Developing Node.js web applications

I

  • implementation, Socket.io chat
    • finalizing / Finalizing the chat implementation
  • indexes
    • about / MongoDB indexing
    • used, for optimizing queries / Optimizing queries using indexes
  • indexing, MongoDB / MongoDB indexing
  • insert() method
    • about / Creating a new document
    • used, for creating document / Creating a document using insert()
  • installation, AngularJS
    • about / Installing AngularJS
    • Bower / Meeting the Bower dependencies manager
    • Bower, configuring / Configuring the Bower dependencies manager
    • Bower used / Installing AngularJS using Bower
  • installation, application dependencies / Installing the package.json dependencies
  • installation, Connect-Flash module
    • about / Installing the Connect-Flash module
  • installation, Grunt task runner / Installing the Grunt task runner
  • installation, Karma command-line tool
    • about / Installing the Karma command-line tool
  • installation, Karma dependencies
    • about / Installing Karma's dependencies
  • installation, Mocha / Installing Mocha
  • installation, MongoDB
    • performing / Installing MongoDB
    • on Windows / Installing MongoDB on Windows
    • on Mac OS X / Installing MongoDB on Mac OS X and Linux
    • on Linux / Installing MongoDB on Mac OS X and Linux
    • from binaries / Installing MongoDB from binaries
    • package manager used / Install MongoDB using a package manager
    • MongoDB shell, using / Using the MongoDB shell
  • installation, Mongoose
    • about / Installing Mongoose
  • installation, ngMock module
    • about / Installing ngMock
  • installation, ngResource module
    • about / Installing the ngResource module
  • installation, ngRoute module
    • about / Installing the ngRoute module
  • installation, node-inspector's grunt task
    • about / Installing node-inspector's grunt task
  • installation, Node.js
    • performing / Installing Node.js
    • on Windows / Installing Node.js on Windows
    • on Mac OS X / Installing Node.js on Mac OS X
    • on Linux / Installing Node.js on Linux
  • installation, NPM
    • performing / The installation process of NPM
    • local mode / The installation process of NPM
    • global mode / The installation process of NPM
    • package, installing / Installing a package using NPM
    • package, removing / Removing a package using NPM
    • package, updating / Updating a package using NPM
  • installation, package
    • NPM used / Installing a package using NPM
  • installation, Passport
    • about / Installing Passport
  • installation, Passport's Facebook strategy
    • about / Installing Passport's Facebook strategy
  • installation, Passport's Google strategy
    • about / Installing Passport's Google strategy
  • installation, Passport's Twitter strategy
    • about / Installing Passport's Twitter strategy
  • installation, Passport local strategy
    • about / Installing Passport's local strategy module
  • installation, Protractor test runner
    • about / Installing the Protractor test runner
  • installation, Should.js / Installing the Should.js and SuperTest modules
  • installation, Socket.io
    • about / Installing Socket.io
    • Socket.io server, configuring / Configuring the Socket.io server
    • Socket.io session, configuring / Configuring the Socket.io session
  • installation, SuperTest / Installing the Should.js and SuperTest modules
  • installation, WebDriver
    • about / Installing the Protractor test runner
  • instance methods
    • about / Defining custom instance methods
  • inversion of control
    • about / Dependency injection
  • it(description, callback) method / Introducing Mocha

J

  • Jasmine
    • AngularJS application, testing with / Introducing the Jasmine framework
    • URL, for documentation / Introducing the Jasmine framework
  • JavaScript
    • history / The evolution of JavaScript
    • closures / JavaScript closures
    • about / Introducing JavaScript testing
  • JavaScript event-driven programming
    • about / JavaScript event-driven programming
  • JavaScript testing
    • about / Introducing JavaScript testing
    • TDD / TDD, BDD, and unit testing
    • BDD / TDD, BDD, and unit testing
    • unit tests / TDD, BDD, and unit testing
    • test frameworks / Test frameworks
    • assertion libraries / Assertion libraries
    • test runners / Test runners
  • join() method
    • about / Joining and leaving rooms
  • jqLite
    • about / The angular global object

K

  • Karma command-line tool
    • installing / Installing the Karma command-line tool
  • Karma configuration file, settings
    • frameworks / Configuring the Karma test runner
    • files / Configuring the Karma test runner
    • reporters / Configuring the Karma test runner
    • browsers / Configuring the Karma test runner
    • captureTimeout / Configuring the Karma test runner
    • singleRun / Configuring the Karma test runner
  • Karma dependencies
    • installing / Installing Karma's dependencies
  • Karma test runner
    • about / Introducing Karma test runner
    • configuring / Configuring the Karma test runner
    • URL, for configuring / Configuring the Karma test runner
  • key features, MongoDB
    • BSON format / The BSON format
    • ad hoc queries / MongoDB ad hoc queries
    • indexing / MongoDB indexing
    • replica set / MongoDB replica set
    • sharding / MongoDB sharding

L

  • --logpath command-line flag / Running MongoDB as a Windows Service
  • lastVisit property
    • about / Configuring sessions
  • leave() method
    • about / Joining and leaving rooms
  • linting, application
    • Grunt used / Linting your application using Grunt
  • Linux
    • Node.js, installing on / Installing Node.js on Linux
  • list() method / Finding multiple user documents using find(), The list() method of the Express controller
  • list-articles view
    • about / The list-articles view
  • listen() method / Developing Node.js web applications
  • local strategy, Passport
    • about / Using Passport's local strategy
    • using / Using Passport's local strategy
    • installing / Installing Passport's local strategy module
    • configuring / Configuring Passport's local strategy
  • logger() middleware / Understanding the order of Connect middleware

M

  • Mac OS X
    • Node.js, installing on / Installing Node.js on Mac OS X
  • make command / Installing Node.js on Linux
  • manual bootstrap
    • about / Manual bootstrap
  • MEAN
    • about / Introducing MEAN
    • advantages / Introducing MEAN
  • method-override module
    • about / Configuring an Express application
  • methodOverride() middleware
    • about / Configuring an Express application
  • Mocha
    • used, for testing Express application / Introducing Mocha
    • about / Introducing Mocha
    • URL, for documentation / Introducing Mocha
    • installing / Installing Mocha
  • Mocha test
    • writing / Writing your first Mocha test
    • Express model, testing / Testing the Express model
    • Express controller, testing / Testing the Express controller
    • executing / Running your Mocha test
  • mocking, AngularJS components
    • about / Mocking AngularJS components
    • ngMock module / Introducing ngMock
    • ngMock module, installing / Installing ngMock
  • Model
    • about / Three-tier web application development
  • models, Mongoose
    • about / Defining custom model methods
    • static methods / Defining custom static methods
    • instance methods / Defining custom instance methods
  • Models tab, Batarang
    • about / Batarang Models
  • model validation
    • about / Model validation
    • predefined validators / Predefined validators
    • custom validators / Custom validators
  • modifiers, Mongoose schema
    • about / Using schema modifiers
    • predefined modifiers / Predefined modifiers
    • custom setter modifiers / Custom setter modifiers
    • custom getter modifiers / Custom getter modifiers
    • URL / Custom getter modifiers
  • module function
    • about / Adding the routing file
  • modules, AngularJS
    • about / AngularJS modules
    • application modules / Application modules
    • external modules / External modules
    • third-party modules / Third-party modules
  • modules, CommonJS
    • about / CommonJS modules
  • modules, Node.js
    • about / Node modules
    • CommonJS modules / CommonJS modules
    • core modules / Node.js core modules
    • third-party modules / Node.js third-party modules
    • file modules / Node.js file modules
    • folder modules / Node.js folder modules
  • MongoDB
    • installing / Installing MongoDB
    • URL, for downloading / Installing MongoDB, Installing MongoDB from binaries
    • URL, for documentation / Installing MongoDB
    • executing, on Windows / Running MongoDB manually
    • installing, from binaries / Installing MongoDB from binaries
    • installing, package manager used / Install MongoDB using a package manager
    • reference links, for installation / Install MongoDB using a package manager
    • about / Introducing MongoDB
    • goals / Introducing MongoDB
    • key features / Key features of MongoDB
    • Mongoose, connecting to / Connecting to MongoDB
  • MongoDB ad hoc queries
    • about / MongoDB ad hoc queries
  • MongoDB as Windows Service
    • executing, on Windows / Running MongoDB as a Windows Service
  • MongoDB collections
    • about / MongoDB collections
  • MongoDB configuration file
    • URL / Running MongoDB as a Windows Service
  • MongoDB CRUD operations
    • about / MongoDB CRUD operations
    • document, creating / Creating a new document
    • document, reading / Reading documents
    • existing documents, updating / Updating existing documents
    • documents, deleting / Deleting documents
  • MongoDB databases
    • about / MongoDB databases
  • MongoDB indexing
    • about / MongoDB indexing
  • MongoDB replica set
    • about / MongoDB replica set
    • URL / MongoDB replica set
  • MongoDB sharding
    • about / MongoDB sharding
    • URL / MongoDB sharding
  • MongoDB shell
    • using / Using the MongoDB shell
    • about / MongoDB shell
  • Mongoose
    • installing / Installing Mongoose
    • connecting, to MongoDB / Connecting to MongoDB
    • schema / Understanding Mongoose schemas
    • URL, for documentation / Advanced querying using find()
    • models / Defining custom model methods
    • DBRef / Using Mongoose DBRef
  • Mongoose middleware
    • about / Using Mongoose middleware
    • using / Using Mongoose middleware
    • pre middleware, using / Using pre middleware
    • post middleware, using / Using post middleware
    • URL / Using post middleware
  • Mongoose model
    • creating / Creating the Mongoose model
  • morgan() middleware
    • about / Configuring an Express application
  • morgan module
    • about / Configuring an Express application
  • multiple documents
    • deleting / Deleting multiple documents
  • multithreading
    • disadvantages / Node.js event-driven programming
  • MVC
    • Model / Three-tier web application development
    • View / Three-tier web application development
    • Controller / Three-tier web application development
  • MVC entities, AngularJS
    • about / AngularJS MVC entities
    • views / AngularJS views
    • controllers / AngularJS controllers and scopes
    • scopes / AngularJS controllers and scopes
  • MVC pattern
    • implementing / Implementing the MVC pattern
    • application folder structure / Application folder structure

N

  • next() method / Meet the Connect module
  • ng-app directive
    • about / Core directives
  • ng-controller directive
    • about / Core directives
  • ng-hide directive
    • about / Core directives
  • ng-model directive
    • about / Core directives
  • ng-repeat directive
    • about / Core directives
  • ng-show directive
    • about / Core directives
  • ngMock module
    • about / Introducing ngMock
    • installing / Installing ngMock
  • ngResource module
    • about / Introducing the ngResource module
    • installing / Installing the ngResource module
    • $resource factory, using / Using the $resource service
  • ngRoute module
    • about / AngularJS routing
    • installing / Installing the ngRoute module
    • URL, for documentation / AngularJS application routes
  • node-inspector
    • used, for debugging Express / Debugging Express with node-inspector
    • about / Debugging Express with node-inspector
    • grunt task, installing / Installing node-inspector's grunt task
    • grunt task, configuring / Configuring node-inspector's grunt task
    • URL, for configuration / Configuring node-inspector's grunt task
    • debug grunt task, running / Running the debug grunt task
  • Node.js
    • installing / Installing Node.js
    • installing, on Windows / Installing Node.js on Windows
    • URL, for downloading / Installing Node.js on Windows, Installing Node.js on Mac OS X, Installing Node.js on Linux
    • installing, on Mac OS X / Installing Node.js on Mac OS X
    • URL, for installation options / Installing Node.js on Linux
    • executing / Running Node.js
    • history / Introduction to Node.js
    • JavaScript event-driven programming / JavaScript event-driven programming
    • modules / Node modules
    • web applications development / Developing Node.js web applications
  • Node.js event-driven programming
    • about / Node.js event-driven programming
  • Nodemon
    • about / Running your application using Grunt
    • URL, for configuration / Running your application using Grunt
  • NODE_ENV environment variable
    • about / Configuring an Express application
  • NoSQL
    • overview / Introduction to NoSQL
  • NPM
    • about / Introducing NPM
    • features / Introducing NPM
    • using / Using NPM
    • URL / Using NPM
    • installing / The installation process of NPM
    • application dependencies managing, package.json file used / Managing dependencies using the package.json file
    • URL, for documentation / Updating the package.json file
  • npm init command / Creating a package.json file
  • npm install command / Installing a package using NPM, Installing the package.json dependencies
  • npm update command / Installing the package.json dependencies

O

  • OAuth
    • about / Understanding Passport OAuth strategies
    • URL / Understanding Passport OAuth strategies
  • OAuth strategies
    • about / Understanding Passport OAuth strategies
    • setting up / Setting up OAuth strategies
    • OAuth user creation, handling / Handling OAuth user creation
    • Passport's Facebook strategy / Using Passport's Facebook strategy
    • Passport's Twitter strategy / Using Passport's Twitter strategy
    • Passport's Google strategy / Using Passport's Google strategy
  • OAuth user creation
    • handling / Handling OAuth user creation
  • Options tab, Batarang
    • about / Batarang options

P

  • package
    • installing, NPM used / Installing a package using NPM
    • removing, NPM used / Removing a package using NPM
    • updating, NPM used / Updating a package using NPM
  • package.json file
    • used, for managing application dependencies / Managing dependencies using the package.json file
    • creating / Creating a package.json file, Installing Express
    • application dependencies, installing / Installing the package.json dependencies
    • updating / Updating the package.json file
  • package manager
    • used, for installing MongoDB / Install MongoDB using a package manager
  • parent() function
    • about / JavaScript closures
  • Passport
    • installing / Installing Passport
    • configuring / Configuring Passport
    • URL, for guide / Wiring Passport's Google strategy routes
  • Passport's Facebook strategy
    • using / Using Passport's Facebook strategy
    • installing / Installing Passport's Facebook strategy
    • configuring / Configuring Passport's Facebook strategy
    • routes, defining / Wiring Passport's Facebook strategy routes
  • Passport's Google strategy
    • using / Using Passport's Google strategy
    • installing / Installing Passport's Google strategy
    • configuring / Configuring Passport's Google strategy
    • routes, defining / Wiring Passport's Google strategy routes
  • Passport's Twitter strategy
    • using / Using Passport's Twitter strategy
    • installing / Installing Passport's Twitter strategy
    • configuring / Configuring Passport's Twitter strategy
    • routes, defining / Wiring Passport's Twitter strategy routes
  • passport.authenticate() method / Wiring the user's routes
  • passport.initialize() middleware / Configuring Passport
  • passport.session() middleware / Configuring Passport
  • Passport strategies
    • about / Understanding Passport strategies
    • local strategy / Using Passport's local strategy
    • user model, adapting / Adapting the User model
    • authentication views, creating / Creating the authentication views
    • user controller, modifying / Modifying the user controller
    • users routes, defining / Wiring the user's routes
    • OAuth strategies / Understanding Passport OAuth strategies
  • Performance tab, Batarang
    • about / Batarang Performance
  • PhantomJS
    • about / Introducing Karma test runner
    • URL, for documentation / Introducing Karma test runner
  • post() method / Using post middleware
  • post middleware
    • using / Using post middleware
    • about / Using post middleware
  • pre() method / Using pre middleware
  • predefined modifiers
    • about / Predefined modifiers
  • predefined validators
    • about / Predefined validators
  • pre middleware
    • about / Using pre middleware
    • using / Using pre middleware
  • process.env.NODE_ENV environment variable
    • using / Configuring an Express application, Environment configuration files
  • process.env.NODE_ENV variable
    • about / Configuring an Express application
  • process.env property
    • about / Configuring an Express application
  • Protractor
    • about / Introducing the Protractor test runner, Installing the Protractor test runner
    • URL / Introducing the Protractor test runner
    • URL, for configuring / Configuring the Protractor test runner
  • Protractor, global objects
    • Browser / Introducing the Protractor test runner
    • Element / Introducing the Protractor test runner
    • By / Introducing the Protractor test runner
    • Protractor / Introducing the Protractor test runner
  • protractor.conf.js file
    • specs property / Configuring the Protractor test runner
    • about / Configuring the Protractor test runner
  • Protractor test runner
    • about / Introducing the Protractor test runner
    • installing / Installing the Protractor test runner
  • protractor test runner
    • configuring / Configuring the Protractor test runner
  • provider method / Creating AngularJS services
  • public folder, horizontal folder structure
    • about / Horizontal folder structure
    • config folder / Horizontal folder structure
    • controllers folder / Horizontal folder structure
    • css folder / Horizontal folder structure
    • directives folder / Horizontal folder structure
    • filters folder / Horizontal folder structure
    • img folder / Horizontal folder structure
    • views folder / Horizontal folder structure
    • application.js file / Horizontal folder structure

Q

  • query() method / The find() and findOne() methods of the AngularJS controller
  • query operators
    • using / Using query operators
    • URL / Using query operators

R

  • $resource factory
    • using / Using the $resource service
  • $resource factory, arguments
    • Url / Using the $resource service
    • ParamDefaults / Using the $resource service
    • Actions / Using the $resource service
    • Options / Using the $resource service
  • $routeProvider object
    • about / AngularJS application routes
  • read() method / Reading a single user document using findOne(), The read() middleware of the Express controller
  • relational databases
    • versus document-based databases / Introduction to NoSQL
  • remove() method / Deleting documents, Deleting an existing user document
  • replica set, MongoDB / MongoDB replica set
  • replication
    • about / MongoDB replica set
  • req.flash() method / Using Connect-Flash module
  • req.login() method / Modifying the user controller
  • req.user object / Reading a single user document using findOne()
  • request object
    • about / The request object
    • req.query method / The request object
    • req.params method / The request object
    • req.body method / The request object
    • req.param(name) method / The request object
    • req.path method / The request object
    • req.ip method / The request object
    • req.host method / The request object
    • req.cookies method / The request object
  • request routing
    • handling / Handling request routing
  • requiresLogin() middleware
    • about / Implementing an authentication middleware
  • res.render() method
    • about / Rendering EJS views
  • res.send() method
    • about / Creating your first Express application
  • resource methods
    • get() method / Using the $resource service
    • save() method / Using the $resource service
    • query() method / Using the $resource service
    • remove() method / Using the $resource service
    • delete() method / Using the $resource service
  • response object
    • about / The response object
    • res.status(code) method / The response object
    • res.set(field, [value]) method / The response object
    • res.cookie(name, value, [options]) method / The response object
    • res.redirect([status], url) method / The response object
    • res.send([body|status], [body])method / The response object
    • res.json([status|body], [body]) method / The response object
    • res.render(view, [locals], callback) method / The response object
  • routing, AngularJS
    • about / AngularJS routing
    • ngRoute module, installing / Installing the ngRoute module
    • URL scheme, configuring / Configuring the URL scheme
    • AngularJS application routes, defining / AngularJS application routes
  • routing file
    • creating / Adding the routing file

S

  • save() method
    • about / Creating a new document
    • used, for creating document / Creating a document using save()
    • used, for creating new users / Creating new users using save()
  • save method
    • used, for updating document / Updating documents using save()
  • sayHello() middleware
    • about / Handling request routing
  • scaling
    • about / MongoDB sharding
    • vertical scaling / MongoDB sharding
    • horizontal scaling / MongoDB sharding
  • schema, Mongoose
    • about / Understanding Mongoose schemas
    • user schema, creating / Creating the user schema and model
    • user model, creating / Creating the user schema and model
    • user model, registering / Registering the User model
    • users, creating with save() method / Creating new users using save()
    • multiple user documents, searching with find() method / Finding multiple user documents using find()
    • users, querying with find() method / Advanced querying using find()
    • single user document, reading with findOne() method / Reading a single user document using findOne()
    • existing user document, updating / Updating an existing user document
    • existing user document, deleting / Deleting an existing user document
    • extending / Extending your Mongoose schema
    • default values, defining / Defining default values
    • modifiers / Using schema modifiers
    • virtual attributes, adding / Adding virtual attributes
    • queries, optimizing with indexes / Optimizing queries using indexes
  • scopes, AngularJS
    • about / AngularJS controllers and scopes
  • server.js file / Registering the User model
  • server folder, vertical folder structure
    • about / Vertical folder structure
    • controllers folder / Vertical folder structure
    • models folder / Vertical folder structure
    • routes folder / Vertical folder structure
    • views folder / Vertical folder structure
    • config folder / Vertical folder structure
  • service method / Creating AngularJS services
  • services, AngularJS
    • about / AngularJS services
    • prebundled services / AngularJS services
    • custom service / AngularJS services
    • in-built services / AngularJS prebundled services
    • creating / Creating AngularJS services
    • using / Using AngularJS services
  • sessions
    • about / Configuring sessions
    • configuring / Configuring sessions
  • sharding
    • about / MongoDB sharding
  • Should.js
    • used, for testing Express application / Introducing Should.js
    • about / Introducing Should.js
    • URL, for documentation / Introducing Should.js
    • installing / Installing the Should.js and SuperTest modules
  • signout() method / Modifying the user controller
  • signup() method / Modifying the user controller
  • single document
    • deleting / Deleting a single document
  • Socket.io
    • URL, for official project page / Emitting events to rooms
    • installing / Installing Socket.io
  • Socket.io chat
    • building / Building a Socket.io chat
    • event handlers, setting of chat server / Setting the event handlers of the chat server
    • Socket service, creating / Creating the Socket service
    • chat controller, creating / Creating the chat controller
    • chat view, creating / Creating the chat view
    • chat routes, adding / Adding chat routes
    • chat implementation, finalizing / Finalizing the chat implementation
  • Socket.io client namespaces
    • about / Socket.io client namespaces
  • Socket.io client object
    • about / The Socket.io client object
  • Socket.io configuration middleware
    • about / The Socket.io configuration middleware
  • Socket.io events
    • about / Socket.io events
    • system events, on socket server / Socket.io events
    • system events, on client / Socket.io events
    • events, handling / Handling events
    • events, emitting / Emitting events
  • Socket.io handshaking
    • about / Socket.io handshaking
  • Socket.io namespaces
    • about / Socket.io namespaces
    • server namespaces / Socket.io server namespaces
    • client namespaces / Socket.io client namespaces
  • Socket.io rooms
    • about / Socket.io rooms
    • room, joining / Joining and leaving rooms
    • room, leaving / Joining and leaving rooms
    • events, emitting to rooms / Emitting events to rooms
  • Socket.io server
    • configuring / Configuring the Socket.io server
  • Socket.io server namespaces / Socket.io server namespaces
  • Socket.io server object
    • about / The Socket.io server object
  • Socket.io session
    • configuring / Configuring the Socket.io session, Configuring the Socket.io session
  • socket.on() method / Socket.io handshaking
  • Socket service, Socket.io chat
    • creating / Creating the Socket service
  • static files
    • serving / Serving static files
  • static methods
    • about / Defining custom static methods
  • successRedirect property / Wiring the user's routes
  • SuperTest
    • used, for testing Express application / Introducing SuperTest
    • about / Introducing SuperTest
    • URL, for documentation / Introducing SuperTest
    • installing / Installing the Should.js and SuperTest modules
  • system events, client
    • socket.io.on('open', ...) / Socket.io events
    • socket.io.on('connect', ...) / Socket.io events
    • socket.io.on('connect_timeout', ...) / Socket.io events
    • socket.io.on('connect_error', ...) / Socket.io events
    • socket.io.on('reconnect_attempt', ...) / Socket.io events
    • socket.io.on('reconnect', ...) / Socket.io events
    • socket.io.on('reconnect_error', ...) / Socket.io events
    • socket.io.on('reconnect_failed', ...) / Socket.io events
    • socket.io.on('close', ...) / Socket.io events
  • system events, socket server
    • io.on('connection', ...) / Socket.io events
    • socket.on('message', ...) / Socket.io events
    • socket.on('disconnect', ...) / Socket.io events

T

  • TDD
    • about / TDD, BDD, and unit testing
  • test environment, Express application
    • configuring / Configuring your test environment
  • test frameworks
    • about / Test frameworks
  • test runners
    • about / Test runners
  • tests
    • E2E tests / Introducing JavaScript testing
    • unit tests / Introducing JavaScript testing
  • third-party modules
    • about / Node.js third-party modules, Third-party modules
  • three-tier web application development
    • about / Three-tier web application development
  • Twitter developers
    • URL / Configuring Passport's Twitter strategy
  • two-way data binding
    • about / Two-way data binding
  • typical blog post example / Introduction to NoSQL

U

  • unit tests
    • about / Introducing JavaScript testing
  • unit tests, AngularJS application
    • about / AngularJS unit tests
    • Karma test runner / Introducing Karma test runner
    • Karma command-line tool, installing / Installing the Karma command-line tool
    • Karma dependencies, installing / Installing Karma's dependencies
    • Karma test runner, configuring / Configuring the Karma test runner
    • AngularJS components, mocking / Mocking AngularJS components
    • writing / Writing AngularJS unit tests
    • modules, testing / Testing modules
    • controllers, testing / Testing controllers
    • services, testing / Testing services
    • routes, testing / Testing routes
    • directives, testing / Testing directives
    • filters, testing / Testing filters
    • ArticleControllers unit test, writing / Writing your first unit test
    • executing / Running your AngularJS unit tests
  • unit tests, JavaScript testing
    • about / TDD, BDD, and unit testing
  • update() method
    • about / Creating a new document
    • used, for creating document / Creating a document using update()
    • used, for updating document / Updating documents using update()
    / Updating an existing user document, The update() method of the Express controller, The update() method of the AngularJS controller
  • URL scheme
    • configuring / Configuring the URL scheme
  • userById() method / Reading a single user document using findOne()
  • user controller, Passport
    • modifying / Modifying the user controller
    • Connect-Flash module / Displaying flash error messages
  • User model
    • about / Creating the user schema and model
  • user model, Passport
    • adapting / Adapting the User model
  • user object, AngularJS authentication
    • rendering / Rendering the user object
  • users controller authentication middleware
    • about / Implementing an authentication middleware
  • users routes, Passport
    • defining / Wiring the user's routes

V

  • validate property / Custom validators
  • vertical folder structure, MVC pattern
    • about / Vertical folder structure
    • server folder / Vertical folder structure
    • client folder / Vertical folder structure
  • vertical scaling
    • about / MongoDB sharding
  • View
    • about / Three-tier web application development
  • view-article view
    • about / The view-article view
  • views
    • rendering / Rendering views
  • views, AngularJS
    • about / AngularJS views
  • virtual attributes
    • adding, to Mongoose schema / Adding virtual attributes

W

  • web applications development, Node.js
    • about / Developing Node.js web applications
    • Connect module / Meet the Connect module
  • WebDriver
    • about / Introducing the Protractor test runner
    • installing / Installing the Protractor test runner
  • WebDriverJS
    • URL / Installing the Protractor test runner
  • WebSockets
    • about / Introducing WebSockets
  • Windows
    • MongoDB, installing on / Installing MongoDB on Windows
    • MongoDB, executing on / Running MongoDB manually
    • MongoDB as Windows Service, executing on / Running MongoDB as a Windows Service
    • Node.js, installing on / Installing Node.js on Windows
  • writeHead() method / Developing Node.js web applications

X

  • XHR long polling
    • about / Introducing WebSockets
  • XHR polling
    • about / Introducing WebSockets