Readme.md
This file
Path
Readme.md
166 lines · 5.3 KiB · Markdown
Last changed by
Merge tag '4.19.0' into 5.xWes Toddbefore adoptione9f9aae
History of this fileTake it
The walk stopped after 200 commits: lines older than 1a9a837 point at it.
docs: fix logo linkDouglas Christopher Wilsonbefore adoption3de4e42
line 1why, one step back1[](http://expressjs.com/)4.7.0Douglas Christopher Wilsonbefore adoption1a9a837
line 2why, one step back2Merge tag '4.19.0' into 5.xWes Toddbefore adoptione9f9aae
line 3why, one step back3 Fast, unopinionated, minimalist web framework for [Node.js](http://nodejs.org).4.7.0Douglas Christopher Wilsonbefore adoption1a9a837
line 4why, one step back4Merge tag '4.19.0' into 5.xWes Toddbefore adoptione9f9aae
lines 5–7why, one step back5 [![NPM Version][npm-version-image]][npm-url]6 [![NPM Install Size][npm-install-size-image]][npm-install-size-url]7 [![NPM Downloads][npm-downloads-image]][npm-downloads-url]4.7.0Douglas Christopher Wilsonbefore adoption1a9a837
lines 8–9why, one step back89```jsMerge tag '4.17.1'Douglas Christopher Wilsonbefore adoption121fe99
lines 10–11why, one step back10const express = require('express')11const app = express()4.7.0Douglas Christopher Wilsonbefore adoption1a9a837
lines 12–19why, one step back1213app.get('/', function (req, res) {14 res.send('Hello World')15})1617app.listen(3000)18```19Merge tag '4.11.1'Douglas Christopher Wilsonbefore adoption8a5ecd3
line 20why, one step back20## Installation4.7.0Douglas Christopher Wilsonbefore adoption1a9a837
line 21why, one step back21Merge tag '4.16.2'Douglas Christopher Wilsonbefore adoption62e12fe
lines 22–27why, one step back22This is a [Node.js](https://nodejs.org/en/) module available through the23[npm registry](https://www.npmjs.com/).2425Before installing, [download and install Node.js](https://nodejs.org/en/download/).26Node.js 0.10 or higher is required.27Merge tag '4.17.2'Douglas Christopher Wilsonbefore adoptionc7d528c
lines 28–30why, one step back28If this is a brand new project, make sure to create a `package.json` first with29the [`npm init` command](https://docs.npmjs.com/creating-a-package-json-file).30Merge tag '4.16.2'Douglas Christopher Wilsonbefore adoption62e12fe
lines 31–33why, one step back31Installation is done using the32[`npm install` command](https://docs.npmjs.com/getting-started/installing-npm-packages-locally):33Merge tag '4.19.0' into 5.xWes Toddbefore adoptione9f9aae
line 34why, one step back34```console4.7.0Douglas Christopher Wilsonbefore adoption1a9a837
lines 35–36why, one step back35$ npm install express36```Merge tag '4.16.2'Douglas Christopher Wilsonbefore adoption62e12fe
lines 37–39why, one step back3738Follow [our installing guide](http://expressjs.com/en/starter/installing.html)39for more information.4.7.0Douglas Christopher Wilsonbefore adoption1a9a837
line 40why, one step back40docs: misc. tweaksFishrock123before adoption5f7a37e
lines 41–52why, one step back41## Features4243 * Robust routing44 * Focus on high performance45 * Super-high test coverage46 * HTTP helpers (redirection, caching, etc)47 * View system supporting 14+ template engines48 * Content negotiation49 * Executable for generating applications quickly5051## Docs & Community52Merge tag '4.15.0'Douglas Christopher Wilsonbefore adoption501e24e
line 53why, one step back53 * [Website and Documentation](http://expressjs.com/) - [[website repo](https://github.com/expressjs/expressjs.com)]Merge tag '4.19.0' into 5.xWes Toddbefore adoptione9f9aae
line 54why, one step back54 * [#express](https://web.libera.chat/#express) on [Libera Chat](https://libera.chat) IRCMerge tag '4.15.4'Douglas Christopher Wilsonbefore adoptionc319fe2
line 55why, one step back55 * [GitHub Organization](https://github.com/expressjs) for Official Middleware & ModulesMerge tag '4.14.0'Douglas Christopher Wilsonbefore adoption1dbfee6
line 56why, one step back56 * Visit the [Wiki](https://github.com/expressjs/express/wiki)docs: misc. tweaksFishrock123before adoption5f7a37e
line 57why, one step back57 * [Google Group](https://groups.google.com/group/express-js) for discussionMerge tag '4.13.4'Douglas Christopher Wilsonbefore adoption7cafdb5
line 58why, one step back58 * [Gitter](https://gitter.im/expressjs/express) for support and discussionMerge tag '4.14.0'Douglas Christopher Wilsonbefore adoption1dbfee6
lines 59–60why, one step back5960**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).docs: misc. tweaksFishrock123before adoption5f7a37e
line 61why, one step back614.7.0Douglas Christopher Wilsonbefore adoption1a9a837
lines 62–67why, one step back62## Quick Start6364 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:6566 Install the executable. The executable's major version will match Express's:67Merge tag '4.19.0' into 5.xWes Toddbefore adoptione9f9aae
line 68why, one step back68```console4.7.0Douglas Christopher Wilsonbefore adoption1a9a837
lines 69–73why, one step back69$ npm install -g express-generator@470```7172 Create the app:73Merge tag '4.19.0' into 5.xWes Toddbefore adoptione9f9aae
line 74why, one step back74```console4.7.0Douglas Christopher Wilsonbefore adoption1a9a837
lines 75–79why, one step back75$ express /tmp/foo && cd /tmp/foo76```7778 Install dependencies:79Merge tag '4.19.0' into 5.xWes Toddbefore adoptione9f9aae
line 80why, one step back80```console4.7.0Douglas Christopher Wilsonbefore adoption1a9a837
lines 81–85why, one step back81$ npm install82```8384 Start the server:85Merge tag '4.19.0' into 5.xWes Toddbefore adoptione9f9aae
line 86why, one step back86```console4.7.0Douglas Christopher Wilsonbefore adoption1a9a837
lines 87–89why, one step back87$ npm start88```89Merge tag '4.17.1'Douglas Christopher Wilsonbefore adoption121fe99
lines 90–91why, one step back90 View the website at: http://localhost:3000914.7.0Douglas Christopher Wilsonbefore adoption1a9a837
lines 92–94why, one step back92## Philosophy9394 The Express philosophy is to provide small, robust tooling for HTTP servers, makingMerge tag '4.17.2'Douglas Christopher Wilsonbefore adoptionc7d528c
line 95why, one step back95 it a great solution for single page applications, websites, hybrids, or public4.7.0Douglas Christopher Wilsonbefore adoption1a9a837
lines 96–98why, one step back96 HTTP APIs.9798 Express does not force you to use any specific ORM or template engine. With support for overdocs: visionmedia is now tj on GithubDouglas Christopher Wilsonbefore adoptione9539fc
line 99why, one step back99 14 template engines via [Consolidate.js](https://github.com/tj/consolidate.js),4.7.0Douglas Christopher Wilsonbefore adoption1a9a837
lines 100–101why, one step back100 you can quickly craft your perfect framework.101docs: misc. tweaksFishrock123before adoption5f7a37e
line 102why, one step back102## Examples4.7.0Douglas Christopher Wilsonbefore adoption1a9a837
line 103why, one step back103Merge tag '4.12.4'Douglas Christopher Wilsonbefore adoptionf90e045
line 104why, one step back104 To view the examples, clone the Express repo and install the dependencies:4.7.0Douglas Christopher Wilsonbefore adoption1a9a837
line 105why, one step back105Merge tag '4.19.0' into 5.xWes Toddbefore adoptione9f9aae
lines 106–107why, one step back106```console107$ git clone https://github.com/expressjs/express.git --depth 14.7.0Douglas Christopher Wilsonbefore adoption1a9a837
lines 108–113why, one step back108$ cd express109$ npm install110```111112 Then run whichever example you want:113Merge tag '4.19.0' into 5.xWes Toddbefore adoptione9f9aae
line 114why, one step back114```consoledocs: misc. tweaksFishrock123before adoption5f7a37e
lines 115–116why, one step back115$ node examples/content-negotiation116```4.7.0Douglas Christopher Wilsonbefore adoption1a9a837
line 117why, one step back117Merge tag '4.19.0' into 5.xWes Toddbefore adoptione9f9aae
line 118why, one step back118## Contributing4.7.0Douglas Christopher Wilsonbefore adoption1a9a837
line 119why, one step back119Merge tag '4.19.0' into 5.xWes Toddbefore adoptione9f9aae
lines 120–122why, one step back120 [![Linux Build][github-actions-ci-image]][github-actions-ci-url]121 [![Windows Build][appveyor-image]][appveyor-url]122 [![Test Coverage][coveralls-image]][coveralls-url]4.7.0Douglas Christopher Wilsonbefore adoption1a9a837
line 123why, one step back123Merge tag '4.19.0' into 5.xWes Toddbefore adoptione9f9aae
lines 124–138why, one step back124The Express.js project welcomes all constructive contributions. Contributions take many forms,125from code for bug fixes and enhancements, to additions and fixes to documentation, additional126tests, triaging incoming pull requests and issues, and more!127128See the [Contributing Guide](Contributing.md) for more technical details on contributing.129130### Security Issues131132If you discover a security vulnerability in Express, please see [Security Policies and Procedures](Security.md).133134### Running Tests135136To run the test suite, first install the dependencies, then run `npm test`:137138```console4.7.0Douglas Christopher Wilsonbefore adoption1a9a837
line 139why, one step back139$ npm installdocs: misc. tweaksFishrock123before adoption5f7a37e
line 140why, one step back140$ npm test4.7.0Douglas Christopher Wilsonbefore adoption1a9a837
lines 141–142why, one step back141```142Merge tag '4.11.1'Douglas Christopher Wilsonbefore adoption8a5ecd3
line 143why, one step back143## People4.7.0Douglas Christopher Wilsonbefore adoption1a9a837
line 144why, one step back144Merge tag '4.16.4'Douglas Christopher Wilsonbefore adoption302a615
line 145why, one step back145The original author of Express is [TJ Holowaychuk](https://github.com/tj)4.7.0Douglas Christopher Wilsonbefore adoption1a9a837
line 146why, one step back146Merge tag '4.16.4'Douglas Christopher Wilsonbefore adoption302a615
line 147why, one step back147The current lead maintainer is [Douglas Christopher Wilson](https://github.com/dougwilson)4.7.0Douglas Christopher Wilsonbefore adoption1a9a837
line 148why, one step back148Merge tag '4.13.4'Douglas Christopher Wilsonbefore adoption7cafdb5
line 149why, one step back149[List of all contributors](https://github.com/expressjs/express/graphs/contributors)4.7.0Douglas Christopher Wilsonbefore adoption1a9a837
line 150why, one step back150Merge tag '4.11.1'Douglas Christopher Wilsonbefore adoption8a5ecd3
line 151why, one step back151## License4.7.0Douglas Christopher Wilsonbefore adoption1a9a837
lines 152–153why, one step back152153 [MIT](LICENSE)docs: misc. tweaksFishrock123before adoption5f7a37e
line 154why, one step back154Merge tag '4.19.0' into 5.xWes Toddbefore adoptione9f9aae
line 155why, one step back155[appveyor-image]: https://badgen.net/appveyor/ci/dougwilson/express/master?label=windowsMerge tag '4.12.0'Douglas Christopher Wilsonbefore adoptionf6ec710
line 156why, one step back156[appveyor-url]: https://ci.appveyor.com/project/dougwilson/expressMerge tag '4.19.0' into 5.xWes Toddbefore adoptione9f9aae
line 157why, one step back157[coveralls-image]: https://badgen.net/coveralls/c/github/expressjs/express/masterMerge tag '4.13.4'Douglas Christopher Wilsonbefore adoption7cafdb5
line 158why, one step back158[coveralls-url]: https://coveralls.io/r/expressjs/express?branch=masterMerge tag '4.19.0' into 5.xWes Toddbefore adoptione9f9aae
lines 159–166why, one step back159[github-actions-ci-image]: https://badgen.net/github/checks/expressjs/express/master?label=linux160[github-actions-ci-url]: https://github.com/expressjs/express/actions/workflows/ci.yml161[npm-downloads-image]: https://badgen.net/npm/dm/express162[npm-downloads-url]: https://npmcharts.com/compare/express?minimal=true163[npm-install-size-image]: https://badgen.net/packagephobia/install/express164[npm-install-size-url]: https://packagephobia.com/result?p=express165[npm-url]: https://npmjs.org/package/express166[npm-version-image]: https://badgen.net/npm/v/express