express.exe 0.0.1769201820754
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/HISTORY.md +0 -0
- package/LICENSE +24 -0
- package/README.md +276 -0
- package/SECURITY.md +0 -0
- package/index.js +11 -0
- package/lib/application.js +631 -0
- package/lib/express.js +81 -0
- package/lib/request.js +557 -0
- package/lib/response.js +1075 -0
- package/lib/utils.js +271 -0
- package/lib/view.js +205 -0
- package/package.json +77 -0
package/HISTORY.md
ADDED
|
File without changes
|
package/LICENSE
ADDED
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
(The MIT License)
|
|
2
|
+
|
|
3
|
+
Copyright (c) 2009-2014 TJ Holowaychuk <tj@vision-media.ca>
|
|
4
|
+
Copyright (c) 2013-2014 Roman Shtylman <shtylman+expressjs@gmail.com>
|
|
5
|
+
Copyright (c) 2014-2015 Douglas Christopher Wilson <doug@somethingdoug.com>
|
|
6
|
+
|
|
7
|
+
Permission is hereby granted, free of charge, to any person obtaining
|
|
8
|
+
a copy of this software and associated documentation files (the
|
|
9
|
+
'Software'), to deal in the Software without restriction, including
|
|
10
|
+
without limitation the rights to use, copy, modify, merge, publish,
|
|
11
|
+
distribute, sublicense, and/or sell copies of the Software, and to
|
|
12
|
+
permit persons to whom the Software is furnished to do so, subject to
|
|
13
|
+
the following conditions:
|
|
14
|
+
|
|
15
|
+
The above copyright notice and this permission notice shall be
|
|
16
|
+
included in all copies or substantial portions of the Software.
|
|
17
|
+
|
|
18
|
+
THE SOFTWARE IS PROVIDED 'AS IS', WITHOUT WARRANTY OF ANY KIND,
|
|
19
|
+
EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
|
|
20
|
+
MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
|
|
21
|
+
IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
|
|
22
|
+
CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
|
|
23
|
+
TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
|
|
24
|
+
SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
package/README.md
ADDED
|
@@ -0,0 +1,276 @@
|
|
|
1
|
+
[](https://expressjs.com/)
|
|
2
|
+
|
|
3
|
+
**Fast, unopinionated, minimalist web framework for [Node.js](https://nodejs.org).**
|
|
4
|
+
|
|
5
|
+
**This project has a [Code of Conduct].**
|
|
6
|
+
|
|
7
|
+
## Table of contents
|
|
8
|
+
|
|
9
|
+
- [Table of contents](#table-of-contents)
|
|
10
|
+
- [Installation](#installation)
|
|
11
|
+
- [Features](#features)
|
|
12
|
+
- [Docs \& Community](#docs--community)
|
|
13
|
+
- [Quick Start](#quick-start)
|
|
14
|
+
- [Philosophy](#philosophy)
|
|
15
|
+
- [Examples](#examples)
|
|
16
|
+
- [Contributing](#contributing)
|
|
17
|
+
- [Security Issues](#security-issues)
|
|
18
|
+
- [Running Tests](#running-tests)
|
|
19
|
+
- [Current project team members](#current-project-team-members)
|
|
20
|
+
- [TC (Technical Committee)](#tc-technical-committee)
|
|
21
|
+
- [TC emeriti members](#tc-emeriti-members)
|
|
22
|
+
- [Triagers](#triagers)
|
|
23
|
+
- [Emeritus Triagers](#emeritus-triagers)
|
|
24
|
+
- [License](#license)
|
|
25
|
+
|
|
26
|
+
|
|
27
|
+
[![NPM Version][npm-version-image]][npm-url]
|
|
28
|
+
[![NPM Downloads][npm-downloads-image]][npm-downloads-url]
|
|
29
|
+
[![Linux Build][github-actions-ci-image]][github-actions-ci-url]
|
|
30
|
+
[![Test Coverage][coveralls-image]][coveralls-url]
|
|
31
|
+
[![OpenSSF Scorecard Badge][ossf-scorecard-badge]][ossf-scorecard-visualizer]
|
|
32
|
+
|
|
33
|
+
|
|
34
|
+
```js
|
|
35
|
+
import express from 'express'
|
|
36
|
+
|
|
37
|
+
const app = express()
|
|
38
|
+
|
|
39
|
+
app.get('/', (req, res) => {
|
|
40
|
+
res.send('Hello World')
|
|
41
|
+
})
|
|
42
|
+
|
|
43
|
+
app.listen(3000, () => {
|
|
44
|
+
console.log('Server is running on http://localhost:3000')
|
|
45
|
+
})
|
|
46
|
+
```
|
|
47
|
+
|
|
48
|
+
## Installation
|
|
49
|
+
|
|
50
|
+
This is a [Node.js](https://nodejs.org/en/) module available through the
|
|
51
|
+
[npm registry](https://www.npmjs.com/).
|
|
52
|
+
|
|
53
|
+
Before installing, [download and install Node.js](https://nodejs.org/en/download/).
|
|
54
|
+
Node.js 18 or higher is required.
|
|
55
|
+
|
|
56
|
+
If this is a brand new project, make sure to create a `package.json` first with
|
|
57
|
+
the [`npm init` command](https://docs.npmjs.com/creating-a-package-json-file).
|
|
58
|
+
|
|
59
|
+
Installation is done using the
|
|
60
|
+
[`npm install` command](https://docs.npmjs.com/getting-started/installing-npm-packages-locally):
|
|
61
|
+
|
|
62
|
+
```bash
|
|
63
|
+
npm install express
|
|
64
|
+
```
|
|
65
|
+
|
|
66
|
+
Follow [our installing guide](https://expressjs.com/en/starter/installing.html)
|
|
67
|
+
for more information.
|
|
68
|
+
|
|
69
|
+
## Features
|
|
70
|
+
|
|
71
|
+
* Robust routing
|
|
72
|
+
* Focus on high performance
|
|
73
|
+
* Super-high test coverage
|
|
74
|
+
* HTTP helpers (redirection, caching, etc)
|
|
75
|
+
* View system supporting 14+ template engines
|
|
76
|
+
* Content negotiation
|
|
77
|
+
* Executable for generating applications quickly
|
|
78
|
+
|
|
79
|
+
## Docs & Community
|
|
80
|
+
|
|
81
|
+
* [Website and Documentation](https://expressjs.com/) - [[website repo](https://github.com/expressjs/expressjs.com)]
|
|
82
|
+
* [GitHub Organization](https://github.com/expressjs) for Official Middleware & Modules
|
|
83
|
+
* [Github Discussions](https://github.com/expressjs/discussions) for discussion on the development and usage of Express
|
|
84
|
+
|
|
85
|
+
**PROTIP** Be sure to read the [migration guide to v5](https://expressjs.com/en/guide/migrating-5)
|
|
86
|
+
|
|
87
|
+
## Quick Start
|
|
88
|
+
|
|
89
|
+
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:
|
|
90
|
+
|
|
91
|
+
Install the executable. The executable's major version will match Express's:
|
|
92
|
+
|
|
93
|
+
```bash
|
|
94
|
+
npm install -g express-generator@4
|
|
95
|
+
```
|
|
96
|
+
|
|
97
|
+
Create the app:
|
|
98
|
+
|
|
99
|
+
```bash
|
|
100
|
+
express /tmp/foo && cd /tmp/foo
|
|
101
|
+
```
|
|
102
|
+
|
|
103
|
+
Install dependencies:
|
|
104
|
+
|
|
105
|
+
```bash
|
|
106
|
+
npm install
|
|
107
|
+
```
|
|
108
|
+
|
|
109
|
+
Start the server:
|
|
110
|
+
|
|
111
|
+
```bash
|
|
112
|
+
npm start
|
|
113
|
+
```
|
|
114
|
+
|
|
115
|
+
View the website at: http://localhost:3000
|
|
116
|
+
|
|
117
|
+
## Philosophy
|
|
118
|
+
|
|
119
|
+
The Express philosophy is to provide small, robust tooling for HTTP servers, making
|
|
120
|
+
it a great solution for single page applications, websites, hybrids, or public
|
|
121
|
+
HTTP APIs.
|
|
122
|
+
|
|
123
|
+
Express does not force you to use any specific ORM or template engine. With support for over
|
|
124
|
+
14 template engines via [@ladjs/consolidate](https://github.com/ladjs/consolidate),
|
|
125
|
+
you can quickly craft your perfect framework.
|
|
126
|
+
|
|
127
|
+
## Examples
|
|
128
|
+
|
|
129
|
+
To view the examples, clone the Express repository:
|
|
130
|
+
|
|
131
|
+
```bash
|
|
132
|
+
git clone https://github.com/expressjs/express.git --depth 1 && cd express
|
|
133
|
+
```
|
|
134
|
+
|
|
135
|
+
Then install the dependencies:
|
|
136
|
+
|
|
137
|
+
```bash
|
|
138
|
+
npm install
|
|
139
|
+
```
|
|
140
|
+
|
|
141
|
+
Then run whichever example you want:
|
|
142
|
+
|
|
143
|
+
```bash
|
|
144
|
+
node examples/content-negotiation
|
|
145
|
+
```
|
|
146
|
+
|
|
147
|
+
## Contributing
|
|
148
|
+
|
|
149
|
+
The Express.js project welcomes all constructive contributions. Contributions take many forms,
|
|
150
|
+
from code for bug fixes and enhancements, to additions and fixes to documentation, additional
|
|
151
|
+
tests, triaging incoming pull requests and issues, and more!
|
|
152
|
+
|
|
153
|
+
See the [Contributing Guide] for more technical details on contributing.
|
|
154
|
+
|
|
155
|
+
### Security Issues
|
|
156
|
+
|
|
157
|
+
If you discover a security vulnerability in Express, please see [Security Policies and Procedures](SECURITY.md).
|
|
158
|
+
|
|
159
|
+
### Running Tests
|
|
160
|
+
|
|
161
|
+
To run the test suite, first install the dependencies:
|
|
162
|
+
|
|
163
|
+
```bash
|
|
164
|
+
npm install
|
|
165
|
+
```
|
|
166
|
+
|
|
167
|
+
Then run `npm test`:
|
|
168
|
+
|
|
169
|
+
```bash
|
|
170
|
+
npm test
|
|
171
|
+
```
|
|
172
|
+
|
|
173
|
+
## Current project team members
|
|
174
|
+
|
|
175
|
+
For information about the governance of the express.js project, see [GOVERNANCE.md](https://github.com/expressjs/discussions/blob/HEAD/docs/GOVERNANCE.md).
|
|
176
|
+
|
|
177
|
+
The original author of Express is [TJ Holowaychuk](https://github.com/tj)
|
|
178
|
+
|
|
179
|
+
[List of all contributors](https://github.com/expressjs/express/graphs/contributors)
|
|
180
|
+
|
|
181
|
+
### TC (Technical Committee)
|
|
182
|
+
|
|
183
|
+
* [UlisesGascon](https://github.com/UlisesGascon) - **Ulises Gascón** (he/him)
|
|
184
|
+
* [jonchurch](https://github.com/jonchurch) - **Jon Church**
|
|
185
|
+
* [wesleytodd](https://github.com/wesleytodd) - **Wes Todd**
|
|
186
|
+
* [LinusU](https://github.com/LinusU) - **Linus Unnebäck**
|
|
187
|
+
* [blakeembrey](https://github.com/blakeembrey) - **Blake Embrey**
|
|
188
|
+
* [sheplu](https://github.com/sheplu) - **Jean Burellier**
|
|
189
|
+
* [crandmck](https://github.com/crandmck) - **Rand McKinney**
|
|
190
|
+
* [ctcpip](https://github.com/ctcpip) - **Chris de Almeida**
|
|
191
|
+
|
|
192
|
+
<details>
|
|
193
|
+
<summary>TC emeriti members</summary>
|
|
194
|
+
|
|
195
|
+
#### TC emeriti members
|
|
196
|
+
|
|
197
|
+
* [dougwilson](https://github.com/dougwilson) - **Douglas Wilson**
|
|
198
|
+
* [hacksparrow](https://github.com/hacksparrow) - **Hage Yaapa**
|
|
199
|
+
* [jonathanong](https://github.com/jonathanong) - **jongleberry**
|
|
200
|
+
* [niftylettuce](https://github.com/niftylettuce) - **niftylettuce**
|
|
201
|
+
* [troygoode](https://github.com/troygoode) - **Troy Goode**
|
|
202
|
+
</details>
|
|
203
|
+
|
|
204
|
+
|
|
205
|
+
### Triagers
|
|
206
|
+
|
|
207
|
+
* [aravindvnair99](https://github.com/aravindvnair99) - **Aravind Nair**
|
|
208
|
+
* [bjohansebas](https://github.com/bjohansebas) - **Sebastian Beltran**
|
|
209
|
+
* [carpasse](https://github.com/carpasse) - **Carlos Serrano**
|
|
210
|
+
* [CBID2](https://github.com/CBID2) - **Christine Belzie**
|
|
211
|
+
* [UlisesGascon](https://github.com/UlisesGascon) - **Ulises Gascón** (he/him)
|
|
212
|
+
* [IamLizu](https://github.com/IamLizu) - **S M Mahmudul Hasan** (he/him)
|
|
213
|
+
* [Phillip9587](https://github.com/Phillip9587) - **Phillip Barta**
|
|
214
|
+
* [efekrskl](https://github.com/efekrskl) - **Efe Karasakal**
|
|
215
|
+
|
|
216
|
+
|
|
217
|
+
<details>
|
|
218
|
+
<summary>Triagers emeriti members</summary>
|
|
219
|
+
|
|
220
|
+
#### Emeritus Triagers
|
|
221
|
+
|
|
222
|
+
* [AuggieH](https://github.com/AuggieH) - **Auggie Hudak**
|
|
223
|
+
* [G-Rath](https://github.com/G-Rath) - **Gareth Jones**
|
|
224
|
+
* [MohammadXroid](https://github.com/MohammadXroid) - **Mohammad Ayashi**
|
|
225
|
+
* [NawafSwe](https://github.com/NawafSwe) - **Nawaf Alsharqi**
|
|
226
|
+
* [NotMoni](https://github.com/NotMoni) - **Moni**
|
|
227
|
+
* [VigneshMurugan](https://github.com/VigneshMurugan) - **Vignesh Murugan**
|
|
228
|
+
* [davidmashe](https://github.com/davidmashe) - **David Ashe**
|
|
229
|
+
* [digitaIfabric](https://github.com/digitaIfabric) - **David**
|
|
230
|
+
* [e-l-i-s-e](https://github.com/e-l-i-s-e) - **Elise Bonner**
|
|
231
|
+
* [fed135](https://github.com/fed135) - **Frederic Charette**
|
|
232
|
+
* [firmanJS](https://github.com/firmanJS) - **Firman Abdul Hakim**
|
|
233
|
+
* [getspooky](https://github.com/getspooky) - **Yasser Ameur**
|
|
234
|
+
* [ghinks](https://github.com/ghinks) - **Glenn**
|
|
235
|
+
* [ghousemohamed](https://github.com/ghousemohamed) - **Ghouse Mohamed**
|
|
236
|
+
* [gireeshpunathil](https://github.com/gireeshpunathil) - **Gireesh Punathil**
|
|
237
|
+
* [jake32321](https://github.com/jake32321) - **Jake Reed**
|
|
238
|
+
* [jonchurch](https://github.com/jonchurch) - **Jon Church**
|
|
239
|
+
* [lekanikotun](https://github.com/lekanikotun) - **Troy Goode**
|
|
240
|
+
* [marsonya](https://github.com/marsonya) - **Lekan Ikotun**
|
|
241
|
+
* [mastermatt](https://github.com/mastermatt) - **Matt R. Wilson**
|
|
242
|
+
* [maxakuru](https://github.com/maxakuru) - **Max Edell**
|
|
243
|
+
* [mlrawlings](https://github.com/mlrawlings) - **Michael Rawlings**
|
|
244
|
+
* [rodion-arr](https://github.com/rodion-arr) - **Rodion Abdurakhimov**
|
|
245
|
+
* [sheplu](https://github.com/sheplu) - **Jean Burellier**
|
|
246
|
+
* [tarunyadav1](https://github.com/tarunyadav1) - **Tarun yadav**
|
|
247
|
+
* [tunniclm](https://github.com/tunniclm) - **Mike Tunnicliffe**
|
|
248
|
+
* [enyoghasim](https://github.com/enyoghasim) - **David Enyoghasim**
|
|
249
|
+
* [0ss](https://github.com/0ss) - **Salah**
|
|
250
|
+
* [import-brain](https://github.com/import-brain) - **Eric Cheng** (he/him)
|
|
251
|
+
* [dakshkhetan](https://github.com/dakshkhetan) - **Daksh Khetan** (he/him)
|
|
252
|
+
* [lucasraziel](https://github.com/lucasraziel) - **Lucas Soares Do Rego**
|
|
253
|
+
* [mertcanaltin](https://github.com/mertcanaltin) - **Mert Can Altin**
|
|
254
|
+
* [dpopp07](https://github.com/dpopp07) - **Dustin Popp**
|
|
255
|
+
* [Sushmeet](https://github.com/Sushmeet) - **Sushmeet Sunger**
|
|
256
|
+
* [3imed-jaberi](https://github.com/3imed-jaberi) - **Imed Jaberi**
|
|
257
|
+
|
|
258
|
+
</details>
|
|
259
|
+
|
|
260
|
+
|
|
261
|
+
## License
|
|
262
|
+
|
|
263
|
+
[MIT](LICENSE)
|
|
264
|
+
|
|
265
|
+
[coveralls-image]: https://img.shields.io/coverallsCoverage/github/expressjs/express?branch=master
|
|
266
|
+
[coveralls-url]: https://coveralls.io/r/expressjs/express?branch=master
|
|
267
|
+
[github-actions-ci-image]: https://img.shields.io/github/actions/workflow/status/expressjs/express/ci.yml?branch=master&label=ci
|
|
268
|
+
[github-actions-ci-url]: https://github.com/expressjs/express/actions/workflows/ci.yml
|
|
269
|
+
[npm-downloads-image]: https://img.shields.io/npm/dm/express
|
|
270
|
+
[npm-downloads-url]: https://npmcharts.com/compare/express?minimal=true
|
|
271
|
+
[npm-url]: https://npmjs.org/package/express
|
|
272
|
+
[npm-version-image]: https://img.shields.io/npm/v/express
|
|
273
|
+
[ossf-scorecard-badge]: https://api.scorecard.dev/projects/github.com/expressjs/express/badge
|
|
274
|
+
[ossf-scorecard-visualizer]: https://ossf.github.io/scorecard-visualizer/#/projects/github.com/expressjs/express
|
|
275
|
+
[Code of Conduct]: https://github.com/expressjs/.github/blob/HEAD/CODE_OF_CONDUCT.md
|
|
276
|
+
[Contributing Guide]: https://github.com/expressjs/.github/blob/HEAD/CONTRIBUTING.md
|
package/SECURITY.md
ADDED
|
File without changes
|
package/index.js
ADDED