Skip to content

Commit 508c740

Browse files
authored
docs: update readme (#5994)
1 parent b274047 commit 508c740

File tree

1 file changed

+42
-38
lines changed

1 file changed

+42
-38
lines changed

Readme.md

+42-38
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
1-
[![Express Logo](https://i.cloudup.com/zfY6lL7eFa-3000x3000.png)](http://expressjs.com/)
1+
[![Express Logo](https://i.cloudup.com/zfY6lL7eFa-3000x3000.png)](https://expressjs.com/)
22

3-
**Fast, unopinionated, minimalist web framework for [Node.js](http://nodejs.org).**
3+
**Fast, unopinionated, minimalist web framework for [Node.js](https://nodejs.org).**
44

55
**This project has a [Code of Conduct][].**
66

@@ -26,10 +26,11 @@
2626

2727

2828
```js
29-
const express = require('express')
29+
import express from 'express'
30+
3031
const app = express()
3132

32-
app.get('/', function (req, res) {
33+
app.get('/', (req, res) => {
3334
res.send('Hello World')
3435
})
3536

@@ -42,19 +43,19 @@ This is a [Node.js](https://nodejs.org/en/) module available through the
4243
[npm registry](https://www.npmjs.com/).
4344

4445
Before installing, [download and install Node.js](https://nodejs.org/en/download/).
45-
Node.js 0.10 or higher is required.
46+
Node.js 18 or higher is required.
4647

4748
If this is a brand new project, make sure to create a `package.json` first with
4849
the [`npm init` command](https://docs.npmjs.com/creating-a-package-json-file).
4950

5051
Installation is done using the
5152
[`npm install` command](https://docs.npmjs.com/getting-started/installing-npm-packages-locally):
5253

53-
```console
54-
$ npm install express
54+
```bash
55+
npm install express
5556
```
5657

57-
Follow [our installing guide](http://expressjs.com/en/starter/installing.html)
58+
Follow [our installing guide](https://expressjs.com/en/starter/installing.html)
5859
for more information.
5960

6061
## Features
@@ -69,41 +70,38 @@ for more information.
6970

7071
## Docs & Community
7172

72-
* [Website and Documentation](http://expressjs.com/) - [[website repo](https://github.com/expressjs/expressjs.com)]
73-
* [#express](https://web.libera.chat/#express) on [Libera Chat](https://libera.chat) IRC
73+
* [Website and Documentation](https://expressjs.com/) - [[website repo](https://github.com/expressjs/expressjs.com)]
7474
* [GitHub Organization](https://github.com/expressjs) for Official Middleware & Modules
75-
* Visit the [Wiki](https://github.com/expressjs/express/wiki)
76-
* [Google Group](https://groups.google.com/group/express-js) for discussion
77-
* [Gitter](https://gitter.im/expressjs/express) for support and discussion
75+
* [Github Discussions](https://github.com/expressjs/discussions) for discussion on the development and usage of Express
7876

79-
**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).
77+
**PROTIP** Be sure to read the [migration guide to v5](https://expressjs.com/en/guide/migrating-5)
8078

8179
## Quick Start
8280

8381
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:
8482

8583
Install the executable. The executable's major version will match Express's:
8684

87-
```console
88-
$ npm install -g express-generator@4
85+
```bash
86+
npm install -g express-generator@4
8987
```
9088

9189
Create the app:
9290

93-
```console
94-
$ express /tmp/foo && cd /tmp/foo
91+
```bash
92+
express /tmp/foo && cd /tmp/foo
9593
```
9694

9795
Install dependencies:
9896

99-
```console
100-
$ npm install
97+
```bash
98+
npm install
10199
```
102100

103101
Start the server:
104102

105-
```console
106-
$ npm start
103+
```bash
104+
npm start
107105
```
108106

109107
View the website at: http://localhost:3000
@@ -115,29 +113,32 @@ $ npm start
115113
HTTP APIs.
116114

117115
Express does not force you to use any specific ORM or template engine. With support for over
118-
14 template engines via [Consolidate.js](https://github.com/tj/consolidate.js),
116+
14 template engines via [@ladjs/consolidate](https://github.com/ladjs/consolidate),
119117
you can quickly craft your perfect framework.
120118

121119
## Examples
122120

123-
To view the examples, clone the Express repo and install the dependencies:
121+
To view the examples, clone the Express repository:
122+
123+
```bash
124+
git clone https://github.com/expressjs/express.git --depth 1 && cd express
125+
```
126+
127+
Then install the dependencies:
124128

125-
```console
126-
$ git clone https://github.com/expressjs/express.git --depth 1
127-
$ cd express
128-
$ npm install
129+
```bash
130+
npm install
129131
```
130132

131133
Then run whichever example you want:
132134

133-
```console
134-
$ node examples/content-negotiation
135+
```bash
136+
node examples/content-negotiation
135137
```
136138

137139
## Contributing
138140

139141
[![Linux Build][github-actions-ci-image]][github-actions-ci-url]
140-
[![Windows Build][appveyor-image]][appveyor-url]
141142
[![Test Coverage][coveralls-image]][coveralls-url]
142143

143144
The Express.js project welcomes all constructive contributions. Contributions take many forms,
@@ -152,11 +153,16 @@ If you discover a security vulnerability in Express, please see [Security Polici
152153

153154
### Running Tests
154155

155-
To run the test suite, first install the dependencies, then run `npm test`:
156+
To run the test suite, first install the dependencies:
157+
158+
```bash
159+
npm install
160+
```
161+
162+
Then run `npm test`:
156163

157-
```console
158-
$ npm install
159-
$ npm test
164+
```bash
165+
npm test
160166
```
161167

162168
## People
@@ -244,11 +250,9 @@ The original author of Express is [TJ Holowaychuk](https://github.com/tj)
244250

245251
[MIT](LICENSE)
246252

247-
[appveyor-image]: https://badgen.net/appveyor/ci/dougwilson/express/master?label=windows
248-
[appveyor-url]: https://ci.appveyor.com/project/dougwilson/express
249253
[coveralls-image]: https://badgen.net/coveralls/c/github/expressjs/express/master
250254
[coveralls-url]: https://coveralls.io/r/expressjs/express?branch=master
251-
[github-actions-ci-image]: https://badgen.net/github/checks/expressjs/express/master?label=linux
255+
[github-actions-ci-image]: https://badgen.net/github/checks/expressjs/express/master?label=CI
252256
[github-actions-ci-url]: https://github.com/expressjs/express/actions/workflows/ci.yml
253257
[npm-downloads-image]: https://badgen.net/npm/dm/express
254258
[npm-downloads-url]: https://npmcharts.com/compare/express?minimal=true

0 commit comments

Comments
 (0)