Pro Express.js

Master Express.js—The Node.js Framework For Your Web Development

by Azat Mardan

[Apress, 2014]

Buy The Book!

Explore Book Highlights

Express.js API reference

Express.js API reference, quick start guides, 20+ meticulously explained examples and tutorials — over 239 pages (print format) with more than 60 illustrations

See More...

Foreword by Anatoliy Chakkaev (@1602), the creator of CompoundJS and JugglingDB.


Quick Start

In this part we’ll briefly go over what is Express.js, install it, build a few simple applications and begin to touch on configurations.

See More...
  • What is Express.js
  • Installation
  • Hello World Example
  • CLI
  • MVC Structure and Modules

The Interface

This part can be used as a stand alone reference for the Express.js API, because it contains description of all the main methods and properties, as well as short examples and exaplanations

See More...
  • Configuration and Settings
  • Middlewares
  • Parameters
  • Routing
  • Request and Response
  • Running an App
  • Error Handling
flat-mockup-template
Tips and Tricks

The best industry practices from the trenches of running production Node.js for everything at the Joyent/Node.js partner Storify. Some topics involve:

See More...
  • Abstraction
  • Streams
  • Redis
  • Clusters
  • Authentication
  • Stylus, LESS and SASS
  • Domains
  • Security
  • Socket.IO
Tutorials and Examples

Hands-on REST API servers with NPM libraries (superagent, Mongoose, Mongoskin, Mocha)third-party services (Storify API, AngelList), databases (MongoDB) and front-end clients (Backbone.js).

See More...
  • Instagram Gallery
  • Todo App
  • REST API
  • HackHall
in Addition

In addition to four aforementioned major examples, there are many other smaller ones. Their full source code is available for examination at github.com/azat-co/expressjsguide

Readers LOVE Pro Express.js!

Pro Express.js Table of Contents

  • Introduction
  • Part One: Getting Started
    1. Starting with Express.js
    2. ‘Hello World’ Example
  • Part Two: Deep API Reference
    1. Configuration, Settings and Environments
    2. Working with Middleware
    3. Templating Engines and Consolidate.js
    4. Parameters and Routing
    5. Request
    6. Response
    7. Error Handling and Running an App
  • Part Three: Solving Common and Abstract Problems
    1. Abstraction
    2. Database, Keys and Stream Tips
    3. Redis and Authentication Pattern
    4. Multithreading with Clusters
    5. Applying Stylus, LESS, and SASS
    6. Security Tips
    7. Socket.io and Express.js
    8. Domains
    9. Sails.js, Derby, LoopBack and Other Frameworks
  • Part Four: Tutorials and Examples
    1. Instagram Gallery
    2. Todo App
    3. REST API
    4. HackHall
  • Bonus
    1. Appendix A: Related Reading and Resources
    1. Appendix B: Migrating Express.js 3.x to 4.x: Middleware, Route and Other Changes
    1. Appendix C: Express.js 4 Cheatsheet
    1. Appendix D: ExpressWorks

About the Author

Azat Mardan

Azat Mardan has over 12 years of experience in web, mobile and software development. With a Bachelor’s Degree in Informatics and a Master of Science in Information Systems Technology degree, Azat possesses deep academic knowledge as well as extensive practical experience.

Currently, Azat works as a Team Lead / Senior Software Engineer at DocuSign, where his team rebuilds 50 million user product (DocuSign web app) using the tech stack of Node.js, Express.js, Backbone.js, CoffeeScript, Jade, Stylus and Redis.

Recently, he worked as an engineer at the curated social media news aggregator website, Storify.com (acquired by LiveFyre) which is used by BBC, NBC, CNN, The White House and others. Storify runs everything on Node.js unlike other companies. It’s the maintainer of the open-source library jade-browser.

Before that, Azat worked as a CTO/co-founder at Gizmo — an enterprise cloud platform for mobile marketing campaigns, and has undertaken the prestigious 500 Startups business accelerator program.

Prior to this, Azat was developing he developed mission-critical applications for government agencies in Washington, DC, including the National Institutes of Health, the National Center for Biotechnology Information, and the Federal Deposit Insurance Corporation, as well as Lockheed Martin.

Azat is a frequent attendee at Bay Area tech meet-ups and hackathons (AngelHack hackathon ’12 finalist with team FashionMetric.com).

In addition, Azat teaches technical classes at General Assembly, Hack Reactor, pariSOMA and Marakana (acquired by Twitter) to much acclaim.

In his spare time, he writes about technology on his blog: webAppLog.com which is number one in “express.js tutorial” Google search results. Azat is also the author of Express.js Guide, Rapid Prototyping with JS and Oh My JS; and the creator of open-source Node.js projects, including ExpressWorks, mongoui and HackHall.