UNPKG

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