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.

179 lines
5.8 KiB

  1. ![express logo](http://f.cl.ly/items/0V2S1n0K1i3y1c122g04/Screen%20Shot%202012-04-11%20at%209.59.42%20AM.png)
  2. Fast, unopinionated, minimalist web framework for [node](http://nodejs.org). [![Build Status](https://secure.travis-ci.org/visionmedia/express.png)](http://travis-ci.org/visionmedia/express) [![Dependency Status](https://gemnasium.com/visionmedia/express.png)](https://gemnasium.com/visionmedia/express)
  3. ```js
  4. var express = require('express');
  5. var app = express();
  6. app.get('/', function(req, res){
  7. res.send('Hello World');
  8. });
  9. app.listen(3000);
  10. ```
  11. ## Installation
  12. $ npm install -g express
  13. ## Quick Start
  14. The quickest way to get started with express is to utilize the executable `express(1)` to generate an application as shown below:
  15. Create the app:
  16. $ npm install -g express
  17. $ express /tmp/foo && cd /tmp/foo
  18. Install dependencies:
  19. $ npm install
  20. Start the server:
  21. $ node app
  22. ## Features
  23. * Built on [Connect](http://github.com/senchalabs/connect)
  24. * Robust routing
  25. * HTTP helpers (redirection, caching, etc)
  26. * View system supporting 14+ template engines
  27. * Content negotiation
  28. * Focus on high performance
  29. * Environment based configuration
  30. * Executable for generating applications quickly
  31. * High test coverage
  32. ## Philosophy
  33. The Express philosophy is to provide small, robust tooling for HTTP servers. Making
  34. it a great solution for single page applications, web sites, hybrids, or public
  35. HTTP APIs.
  36. Built on Connect you can use _only_ what you need, and nothing more, applications
  37. can be as big or as small as you like, even a single file. Express does
  38. not force you to use any specific ORM or template engine. With support for over
  39. 14 template engines via [Consolidate.js](http://github.com/visionmedia/consolidate.js)
  40. you can quickly craft your perfect framework.
  41. ## More Information
  42. * Join #express on freenode
  43. * [Google Group](http://groups.google.com/group/express-js) for discussion
  44. * Follow [tjholowaychuk](http://twitter.com/tjholowaychuk) on twitter for updates
  45. * Visit the [Wiki](http://github.com/visionmedia/express/wiki)
  46. * [Русскоязычная документация](http://jsman.ru/express/)
  47. * Run express examples [online](https://runnable.com/express)
  48. ## Viewing Examples
  49. Clone the Express repo, then install the dev dependencies to install all the example / test suite deps:
  50. $ git clone git://github.com/visionmedia/express.git --depth 1
  51. $ cd express
  52. $ npm install
  53. then run whichever tests you want:
  54. $ node examples/content-negotiation
  55. ## Running Tests
  56. To run the test suite first invoke the following command within the repo, installing the development dependencies:
  57. $ npm install
  58. then run the tests:
  59. $ make test
  60. ## Contributors
  61. ```
  62. project: express
  63. commits: 3559
  64. active : 468 days
  65. files : 237
  66. authors:
  67. 1891 Tj Holowaychuk 53.1%
  68. 1285 visionmedia 36.1%
  69. 182 TJ Holowaychuk 5.1%
  70. 54 Aaron Heckmann 1.5%
  71. 34 csausdev 1.0%
  72. 26 ciaranj 0.7%
  73. 21 Robert Sköld 0.6%
  74. 6 Guillermo Rauch 0.2%
  75. 3 Dav Glass 0.1%
  76. 3 Nick Poulden 0.1%
  77. 2 Randy Merrill 0.1%
  78. 2 Benny Wong 0.1%
  79. 2 Hunter Loftis 0.1%
  80. 2 Jake Gordon 0.1%
  81. 2 Brian McKinney 0.1%
  82. 2 Roman Shtylman 0.1%
  83. 2 Ben Weaver 0.1%
  84. 2 Dave Hoover 0.1%
  85. 2 Eivind Fjeldstad 0.1%
  86. 2 Daniel Shaw 0.1%
  87. 1 Matt Colyer 0.0%
  88. 1 Pau Ramon 0.0%
  89. 1 Pero Pejovic 0.0%
  90. 1 Peter Rekdal Sunde 0.0%
  91. 1 Raynos 0.0%
  92. 1 Teng Siong Ong 0.0%
  93. 1 Viktor Kelemen 0.0%
  94. 1 ctide 0.0%
  95. 1 8bitDesigner 0.0%
  96. 1 isaacs 0.0%
  97. 1 mgutz 0.0%
  98. 1 pikeas 0.0%
  99. 1 shuwatto 0.0%
  100. 1 tstrimple 0.0%
  101. 1 ewoudj 0.0%
  102. 1 Adam Sanderson 0.0%
  103. 1 Andrii Kostenko 0.0%
  104. 1 Andy Hiew 0.0%
  105. 1 Arpad Borsos 0.0%
  106. 1 Ashwin Purohit 0.0%
  107. 1 Benjen 0.0%
  108. 1 Darren Torpey 0.0%
  109. 1 Greg Ritter 0.0%
  110. 1 Gregory Ritter 0.0%
  111. 1 James Herdman 0.0%
  112. 1 Jim Snodgrass 0.0%
  113. 1 Joe McCann 0.0%
  114. 1 Jonathan Dumaine 0.0%
  115. 1 Jonathan Palardy 0.0%
  116. 1 Jonathan Zacsh 0.0%
  117. 1 Justin Lilly 0.0%
  118. 1 Ken Sato 0.0%
  119. 1 Maciej Małecki 0.0%
  120. 1 Masahiro Hayashi 0.0%
  121. ```
  122. ## License
  123. (The MIT License)
  124. Copyright (c) 2009-2012 TJ Holowaychuk <tj@vision-media.ca>
  125. Permission is hereby granted, free of charge, to any person obtaining
  126. a copy of this software and associated documentation files (the
  127. 'Software'), to deal in the Software without restriction, including
  128. without limitation the rights to use, copy, modify, merge, publish,
  129. distribute, sublicense, and/or sell copies of the Software, and to
  130. permit persons to whom the Software is furnished to do so, subject to
  131. the following conditions:
  132. The above copyright notice and this permission notice shall be
  133. included in all copies or substantial portions of the Software.
  134. THE SOFTWARE IS PROVIDED 'AS IS', WITHOUT WARRANTY OF ANY KIND,
  135. EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
  136. MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
  137. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
  138. CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
  139. TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
  140. SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.