Free Sample
+ Collection

Advanced Express Web Application Development

Andrew Keig

For experienced JavaScript developers this book is all you need to build highly scalable, robust applications using Express. It takes you step by step through the development of a single page application so you learn empirically.
RRP $23.99
RRP $39.99
Print + eBook

Want this title & more?

$12.99 p/month

Subscribe to PacktLib

Enjoy full and instant access to over 2000 books and videos – you’ll find everything you need to stay ahead of the curve and make sure you can always get the job done.

Book Details

ISBN 139781783282494
Paperback148 pages

About This Book

  • Learn how to build scalable, robust, and reliable web applications with Express using a test-first, feature-driven approach
  • Full of practical tips and real world examples, and delivered in an easy-to-read format
  • Explore and tackle the issues you encounter in commercially developing and deploying an Express application

Who This Book Is For

If you are an experienced JavaScript developer who wants to build highly scalable, real-world applications using Express, this book is ideal for you. This book is an advanced title and assumes that the reader has some experience with Node.js, JavaScript MVC web development frameworks, and has heard of Express before, or is familiar with it. You should also have a basic understanding of Redis and MongoDB.

Table of Contents

Chapter 1: Foundations
Feature set
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
Chapter 2: 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
Chapter 3: Templating
Server-side templating
Feature: Master Page
Package management with Bower
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
Chapter 4: Real-time Communication
Caching data with Redis
Populating Redis
Socket.IO on the client
Scheduling Redis population
Chapter 5: 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
Chapter 6: Scaling
Scaling Express sessions with Redis
Scaling Socket.IO with Redis
Scaling Express horizontally
Vertical scale with Cluster
Balancing load with Hipache
Chapter 7: Production
Error handling, domains, and crash-only design
Redis sessions
SSL termination

What You Will Learn

  • Drive Express development via test
  • Build and consume a RESTful web API using client and server-side templating
  • Secure and protect Express with passport authentication and SSL via stud
  • Scale Express beyond a single server with Redis and Hipache
  • Decouple Express for improved scalability and maintainability
  • Support real-time application development with Socket.IO
  • Handle failures with a minimum impact to service availability using cluster and domains
  • Understand and cope with Express limitations, including when and where to go for help

In Detail

Building an Express application that is reliable, robust, maintainable, testable, and can scale beyond a single server requires a bit of extra thought and effort. Express applications that need to survive in a production environment will need to reach out to the Node ecosystem and beyond, for support.

You will start by laying the foundations of your software development journey, as you drive-out features under test. You will move on quickly to expand on your existing knowledge, learning how to create a web API and a consuming client. You will then introduce a real-time element in your application.

Following on from this, you will begin a process of incrementally improving your application as you tackle security, introduce SSL support, and how to handle security vulnerabilities. Next, the book will take you through the process of scaling and then decoupling your application. Finally, you will take a look at various ways you can improve your application's performance and reliability.


Read More