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.

135 lines
4.2 KiB

8 years ago
  1. [![Express Logo](https://i.cloudup.com/zfY6lL7eFa-3000x3000.png)](http://expressjs.com/)
  2. Fast, unopinionated, minimalist web framework for [node](http://nodejs.org).
  3. [![NPM Version][npm-image]][npm-url]
  4. [![NPM Downloads][downloads-image]][downloads-url]
  5. [![Build Status][travis-image]][travis-url]
  6. [![Test Coverage][coveralls-image]][coveralls-url]
  7. ```js
  8. var express = require('express')
  9. var app = express()
  10. app.get('/', function (req, res) {
  11. res.send('Hello World')
  12. })
  13. app.listen(3000)
  14. ```
  15. ### Installation
  16. ```bash
  17. $ npm install express
  18. ```
  19. ## Features
  20. * Robust routing
  21. * Focus on high performance
  22. * Super-high test coverage
  23. * HTTP helpers (redirection, caching, etc)
  24. * View system supporting 14+ template engines
  25. * Content negotiation
  26. * Executable for generating applications quickly
  27. ## Docs & Community
  28. * [Website and Documentation](http://expressjs.com/) - [[website repo](https://github.com/strongloop/expressjs.com)]
  29. * [#express](https://webchat.freenode.net/?channels=express) on freenode IRC
  30. * [Github Organization](https://github.com/expressjs) for Official Middleware & Modules
  31. * Visit the [Wiki](https://github.com/strongloop/express/wiki)
  32. * [Google Group](https://groups.google.com/group/express-js) for discussion
  33. * [Русскоязычная документация](http://jsman.ru/express/)
  34. * [한국어 문서](http://expressjs.kr) - [[website repo](https://github.com/Hanul/expressjs.kr)]
  35. **PROTIP** Be sure to read [Migrating from 3.x to 4.x](https://github.com/strongloop/express/wiki/Migrating-from-3.x-to-4.x) as well as [New features in 4.x](https://github.com/strongloop/express/wiki/New-features-in-4.x).
  36. ## Quick Start
  37. The quickest way to get started with express is to utilize the executable [`express(1)`](https://github.com/expressjs/generator) to generate an application as shown below:
  38. Install the executable. The executable's major version will match Express's:
  39. ```bash
  40. $ npm install -g express-generator@4
  41. ```
  42. Create the app:
  43. ```bash
  44. $ express /tmp/foo && cd /tmp/foo
  45. ```
  46. Install dependencies:
  47. ```bash
  48. $ npm install
  49. ```
  50. Start the server:
  51. ```bash
  52. $ npm start
  53. ```
  54. ## Philosophy
  55. The Express philosophy is to provide small, robust tooling for HTTP servers, making
  56. it a great solution for single page applications, web sites, hybrids, or public
  57. HTTP APIs.
  58. Express does not force you to use any specific ORM or template engine. With support for over
  59. 14 template engines via [Consolidate.js](https://github.com/tj/consolidate.js),
  60. you can quickly craft your perfect framework.
  61. ## Examples
  62. To view the examples, clone the Express repo & install the dependancies:
  63. ```bash
  64. $ git clone git://github.com/strongloop/express.git --depth 1
  65. $ cd express
  66. $ npm install
  67. ```
  68. Then run whichever example you want:
  69. ```bash
  70. $ node examples/content-negotiation
  71. ```
  72. ## Tests
  73. To run the test suite, first install the dependancies, then run `npm test`:
  74. ```bash
  75. $ npm install
  76. $ npm test
  77. ```
  78. ### People
  79. The original author of Express is [TJ Holowaychuk](https://github.com/tj) [![TJ's Gratipay][gratipay-image-visionmedia]][gratipay-url-visionmedia]
  80. The current lead maintainer is [Douglas Christopher Wilson](https://github.com/dougwilson) [![Doug's Gratipay][gratipay-image-dougwilson]][gratipay-url-dougwilson]
  81. [List of all contributors](https://github.com/strongloop/express/graphs/contributors)
  82. ### License
  83. [MIT](LICENSE)
  84. [npm-image]: https://img.shields.io/npm/v/express.svg?style=flat
  85. [npm-url]: https://npmjs.org/package/express
  86. [downloads-image]: https://img.shields.io/npm/dm/express.svg?style=flat
  87. [downloads-url]: https://npmjs.org/package/express
  88. [travis-image]: https://img.shields.io/travis/strongloop/express.svg?style=flat
  89. [travis-url]: https://travis-ci.org/strongloop/express
  90. [coveralls-image]: https://img.shields.io/coveralls/strongloop/express.svg?style=flat
  91. [coveralls-url]: https://coveralls.io/r/strongloop/express?branch=master
  92. [gratipay-image-visionmedia]: https://img.shields.io/gratipay/visionmedia.svg?style=flat
  93. [gratipay-url-visionmedia]: https://gratipay.com/visionmedia/
  94. [gratipay-image-dougwilson]: https://img.shields.io/gratipay/dougwilson.svg?style=flat
  95. [gratipay-url-dougwilson]: https://gratipay.com/dougwilson/