Express.js Deep API Reference

Book description

Express.js Deep API Reference is your short, concise guide to Express.js APIs. This flexible Node.js web application framework provides a robust set of features for building single, multi-page, and hybrid web applications.

Through six to-the-point chapters, you will find references for configurations, settings, environments, middleware, templating engines (including Consolidate.js), extract parameters, routing, request handlers, response, and streams.

Written by Azat Mardan, the author of Pro Express.js and Practical Node.js, you will find this short, concise guide indispensable for your Express.js work.

Table of contents

  1. Cover
  2. Title
  3. Copyright
  4. Contents at a Glance
  5. Contents
  6. About the Author
  7. About the Technical Reviewer
  8. Acknowledgments
  9. Introduction
  10. Chapter 1: Configuration, Settings, and Environments
    1. Configuration
      1. app.set() and app.get()
      2. app.enable() and app.disable()
      3. app.enabled() and app.disabled()
    2. Settings
      1. env
      2. view cache
      3. view engine
      4. views
      5. trust proxy
      6. jsonp callback name
      7. json replacer and json spaces
      8. case sensitive routing
      9. strict routing
      10. x-powered-by
      11. etag
      12. query parser
      13. subdomain offset
    3. Environments
    4. Summary
  11. Chapter 2: Working with Middleware
    1. Applying Middleware
    2. Essential Middleware
      1. compression
      2. morgan
      3. body-parser
      4. urlencoded()
      5. cookie-parser
      6. express-session
      7. csurf
      8. express.static()
      9. connect-timeout
      10. errorhandler
      11. method-override
      12. response-time
      13. serve-favicon
      14. serve-index
      15. vhost
      16. connect-busboy
    3. Other Middleware
    4. Summary
  12. Chapter 3: Template Engines and Consolidate.js
    1. How to Use Template Engines
      1. app.engine()
      2. Uncommon Libraries
    2. Template Engine Choices
      1. Jade
      2. Haml.js
      3. EJS
      4. Handlebars.js
      5. Hogan.js Adapters
      6. Combyne.js
      7. Swig
      8. Whiskers
      9. Blade
      10. Haml-Coffee
      11. Webfiller
    3. Consolidate.js
    4. Summary
  13. Chapter 4: Parameters and Routing
    1. Parameters
      1. app.param()
    2. Routing
      1. app.VERB()
      2. app.all()
      3. Trailing Slashes
      4. Router Class
      5. router.route(path)
    3. Request Handlers
    4. Summary
  14. Chapter 5: Express.js Request Object
    1. request.query
    2. request.params
    3. request.body
    4. request.route
    5. request.cookies
    6. request.signedCookies
    7. request.header() and request.get()
    8. Other Attributes and Methods
    9. Summary
  15. Chapter 6: Response
    1. response.render()
    2. response.locals
    3. response.set()
    4. response.status()
    5. response.send()
    6. response.json()
    7. response.jsonp()
    8. response.redirect()
    9. Other Response Methods and Properties
    10. Streams
    11. Summary
  16. Chapter 7: Error Handling and Running an App
    1. Error Handling
    2. Running an App
      1. app.locals
      2. app.render()
      3. app.mountpath
      4. app.on(‘mount’, function(parent){...})
      5. app.path()
      6. app.listen()
    3. Summary
  17. Index

Product information

  • Title: Express.js Deep API Reference
  • Author(s):
  • Release date: December 2014
  • Publisher(s): Apress
  • ISBN: 9781484207819