You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

49 lines
2.2 KiB

  1. /**
  2. * Connect is a middleware framework for node,
  3. * shipping with over 18 bundled middleware and a rich selection of
  4. * 3rd-party middleware.
  5. *
  6. * var app = connect()
  7. * .use(connect.logger('dev'))
  8. * .use(connect.static('public'))
  9. * .use(function(req, res){
  10. * res.end('hello world\n');
  11. * })
  12. * .listen(3000);
  13. *
  14. * Installation:
  15. *
  16. * $ npm install connect
  17. *
  18. * Middleware:
  19. *
  20. * - [logger](logger.html) request logger with custom format support
  21. * - [csrf](csrf.html) Cross-site request forgery protection
  22. * - [compress](compress.html) Gzip compression middleware
  23. * - [basicAuth](basicAuth.html) basic http authentication
  24. * - [bodyParser](bodyParser.html) extensible request body parser
  25. * - [json](json.html) application/json parser
  26. * - [urlencoded](urlencoded.html) application/x-www-form-urlencoded parser
  27. * - [multipart](multipart.html) multipart/form-data parser
  28. * - [timeout](timeout.html) request timeouts
  29. * - [cookieParser](cookieParser.html) cookie parser
  30. * - [session](session.html) session management support with bundled MemoryStore
  31. * - [cookieSession](cookieSession.html) cookie-based session support
  32. * - [methodOverride](methodOverride.html) faux HTTP method support
  33. * - [responseTime](responseTime.html) calculates response-time and exposes via X-Response-Time
  34. * - [staticCache](staticCache.html) memory cache layer for the static() middleware
  35. * - [static](static.html) streaming static file server supporting `Range` and more
  36. * - [directory](directory.html) directory listing middleware
  37. * - [vhost](vhost.html) virtual host sub-domain mapping middleware
  38. * - [favicon](favicon.html) efficient favicon server (with default icon)
  39. * - [limit](limit.html) limit the bytesize of request bodies
  40. * - [query](query.html) automatic querystring parser, populating `req.query`
  41. * - [errorHandler](errorHandler.html) flexible error handler
  42. *
  43. * Links:
  44. *
  45. * - list of [3rd-party](https://github.com/senchalabs/connect/wiki) middleware
  46. * - GitHub [repository](http://github.com/senchalabs/connect)
  47. * - [test documentation](https://github.com/senchalabs/connect/blob/gh-pages/tests.md)
  48. *
  49. */