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.

142 lines
4.4 KiB

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