PacktLib: Advanced Express Web Application Development

Advanced Express Web Application Development

Credits

About the Author

About the Reviewers

www.PacktPub.com

Preface

Foundations

Feature set

Installation

package.json

Testing Express with Mocha and SuperTest

Feature: Heartbeat

Continuous testing with Mocha

Code coverage with Mocha and JSCoverage

Configuring Express with Nconf

Extracting routes

404 handling middleware

Logging middleware

Logging with Winston

Task automation with Grunt

Summary

Building a Web API

Persisting data with MongoDB and Mongoose

GitHub tokens

Feature: Create a project

Feature: Get a project

Feature: Edit a project

Feature: Delete a project

Feature: List projects

GitHub API

Feature: List repositories

Feature: List commits

Feature: List issues

Validating parameters with param middleware

Route improvements

Summary

Templating

Server-side templating

Feature: Master Page

Package management with Bower

Templates

Client-side development with Backbone.js

Feature: List projects

Feature: List repositories

Feature: Create a project

Feature: Edit a project

Feature: Delete a project

Feature: List commits

Feature: List issues

Summary

Real-time Communication

Caching data with Redis

Populating Redis

Socket.IO

Socket.IO on the client

Scheduling Redis population

Summary

Security

Setting up Passport

Acceptance testing with Cucumber and Zombie.js

Feature: Authentication

Securing our site with HTTPS

Sharing Express sessions with Socket.IO

Cross-site request forgery

Improving security with HTTP headers and helmet

Summary

Scaling

Scaling Express sessions with Redis

Scaling Socket.IO with Redis

Scaling Express horizontally

Vertical scale with Cluster

Balancing load with Hipache

Summary

Production

Error handling, domains, and crash-only design

Redis sessions

SSL termination

Caching

Favicon

Compression

Logging

Summary

Index