Connect

Connect is a middleware framework for node, shipping with over 11 bundled middleware and a rich choice of 3rd-party middleware.

Installation

$ npm install connect

API

Middleware

  • logger request logger with custom format support
  • csrf Cross-site request forgery protection
  • basicAuth basic http authentication
  • bodyParser extensible request body parser
  • cookieParser cookie parser
  • session session management support with bundled MemoryStore
  • compiler static asset compiler (sass, less, coffee-script, etc)
  • methodOverride faux HTTP method support
  • responseTime calculates response-time and exposes via X-Response-Time
  • router provides rich Sinatra / Express-like routing
  • staticCache memory cache layer for the static() middleware
  • static streaming static file server supporting Range and more
  • directory directory listing middleware
  • vhost virtual host sub-domain mapping middleware
  • favicon efficient favicon server (with default icon)
  • limit limit the bytesize of request bodies
  • profiler request profiler reporting response-time, memory usage, etc
  • query automatic querystring parser, populating req.query
  • errorHandler flexible error handler

Internals

View Source