Free Trial

Safari Books Online is a digital library providing on-demand subscription access to thousands of learning resources.

  • Create BookmarkCreate Bookmark
  • Create Note or TagCreate Note or Tag
  • PrintPrint
Share this Page URL
Help

10. Pro HTML5 Application Hacks with Nod... > Hack 83. Use the Express Application...

Hack 83. Use the Express Application Generator to Bootstrap Your App

Express’s application generator executable helps you build the skeleton for your application from the command line.

Why Use Express?

In earlier hacks we were operating on the request and response objects using only the HTTP module. Node.js ships with another “core” module called Connect that provides an additional layer of functionality on top of HTTP.

The HTTP module’s createServer method returns an object that you can use to respond to HTTP requests. That object inherits the http.Server prototype.

Connect also offers a createServer method, which returns an object that inherits an extended version of http.Server. Connect’s extensions are mainly there to make it easy to plug in middleware. That’s why Connect describes itself as a “middleware framework.”


  

You are currently reading a PREVIEW of this book.

                                                                                                                    

Get instant access to over $1 million worth of books and videos.

  

Start a Free 10-Day Trial


  
  • Safari Books Online
  • Create BookmarkCreate Bookmark
  • Create Note or TagCreate Note or Tag
  • PrintPrint