You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
New Crowdin translations by GitHub Action
Co-authored-by: Crowdin Bot <support+bot@crowdin.com>
Co-authored-by: Sebastian Beltran <bjohansebas@gmail.com>
Wenn Sie eine dieser Methoden oder Eigenschaften in Ihrer Anwendung verwenden, stürzt die Anwendung ab. Sie müssen also Ihre Anwendung ändern, wenn Sie auf Version 5 umgestellt haben.
90
90
91
-
<h4id="app.del">app.del()</h4>
91
+
<h3id="app.del">app.del()</h3>
92
92
93
93
Express 5 unterstützt die Funktion `app.del()` nicht mehr. Wenn Sie diese Funktion verwenden, wird ein Fehler ausgelöst. Für die Registrierung von HTTP DELETE-Weiterleitungen verwenden Sie stattdessen die Funktion `app.delete()`.
Die Signatur `app.param(fn)` wurde für die Änderung der Verhaltensweise der Funktion `app.param(name, fn)` verwendet. Seit v4.11.0 wurde sie nicht mehr verwendet. In Express 5 wird sie überhaupt nicht mehr unterstützt.
123
123
124
-
<h4id="plural">Pluralisierte Methodennamen</h4>
124
+
<h3id="plural">Pluralisierte Methodennamen</h3>
125
125
126
126
Die folgenden Methodennamen wurden pluralisiert. In Express 4 wurde bei Verwendung der alten Methoden eine Warnung zur Einstellung der Unterstützung ausgegeben. Express 5 unterstützt diese Methoden nicht mehr.
<h4id="leading">Führender Doppelpunkt (:) im Namen für app.param(name, fn)</h4>
165
+
<h3id="leading">Führender Doppelpunkt (:) im Namen für app.param(name, fn)</h3>
166
166
167
167
Ein führendes Doppelpunktzeichen (:) im Namen für die Funktion `app.param(name, fn)` ist ein Überbleibsel aus Express 3. Aus Gründen der Abwärtskompatibilität wurde dieser Name in Express 4 mit einem Hinweis zu veralteten Versionen weiter unterstützt. In Express 5 wird dieser Name stillschwiegend ignoriert und der Namensparameter ohne einen vorangestellten Doppelpunkt verwendet.
168
168
169
169
Dies dürfte keine Auswirkungen auf Ihren Code haben, wenn Sie die Express 4-Dokumentation zu [app.param](/{{ page.lang }}/4x/api.html#app.param) befolgen, da dort der führende Doppelpunkt nicht erwähnt wird.
170
170
171
-
<h4id="req.param">req.param(name)</h4>
171
+
<h3id="req.param">req.param(name)</h3>
172
172
173
173
Dieses potenziell verwirrende und durchaus riskante Verfahren des Abrufens von Formulardaten wurde entfernt. Sie müssen nun ganz speziell nach dem übergebenen Parameternamen im Objekt `req.params`, `req.body` oder `req.query` suchen.
Express 5 unterstützt die Signatur `res.json(obj, status)` nicht mehr. Stattdessen müssen Sie den Status festlegen und diesen dann mit `res.json()`-Methoden wie dieser verketten: `res.status(status).json(obj)`.
Express 5 unterstützt die Signatur `res.jsonp(obj, status)` nicht mehr. Stattdessen müssen Sie den Status festlegen und diesen dann mit `res.jsonp()`-Methoden wie dieser verketten: `res.status(status).jsonp(obj)`.
Express 5 unterstützt die Signatur `res.send(obj, status)` nicht mehr. Stattdessen müssen Sie den Status festlegen und diesen dann mit `res.send()`-Methoden wie dieser verketten: `res.status(status).send(obj)`.
<h4id="magic-redirect">res.redirect('back') and res.location('back')</h4>
260
+
<h3id="magic-redirect">res.redirect('back') and res.location('back')</h3>
261
261
262
262
Express 5 no longer supports the magic string `back` in the `res.redirect()` and `res.location()` methods. Instead, use the `req.get('Referrer') || '/'` value to redirect back to the previous page. In Express 4, the res.`redirect('back')` and `res.location('back')` methods were deprecated.
Express 5 no longer supports the signature `res.send(obj, status)`. Instead, set the status and then chain it to the `res.send()` method like this: `res.status(status).send(obj)`.
Express 5 unterstützt die Signatur <code>res.send(<em>status</em>)</code>, nicht mehr, wobei _`status`_ für eine Zahl steht. Verwenden Sie stattdessen die Funktion `res.sendStatus(statusCode)`, mit der der Statuscode für den HTTP-Antwort-Header festgelegt und die Textversion des Codes gesendet wird: "Not Found" (Nicht gefunden), "Internal Server Error" (Interner Serverfehler) usw.
308
308
Wenn Sie eine Zahl senden und hierfür die Funktion `res.send()` verwenden müssen, müssen Sie die Zahl in Anführungszeichen setzen, um diese in eine Zeichenfolge zu konvertieren. Dadurch interpretiert Express diese Zahl nicht als Versuch, die nicht mehr unterstützte alte Signatur zu verwenden.
The `router.param(fn)` signature was used for modifying the behavior of the `router.param(name, fn)` function. Seit v4.11.0 wurde sie nicht mehr verwendet. In Express 5 wird sie überhaupt nicht mehr unterstützt.
Path route matching syntax is when a string is supplied as the first parameter to the `app.all()`, `app.use()`, `app.METHOD()`, `router.all()`, `router.METHOD()`, and `router.use()` APIs. The following changes have been made to how the path string is matched to an incoming request:
- Some characters have been reserved to avoid confusion during upgrade (`()[]?+!`), use `\` to escape them.
443
443
- Parameter names now support valid JavaScript identifiers, or quoted like `:"this"`.
444
444
445
-
<h4id="rejected-promises">Rejected promises handled from middleware and handlers</h4>
445
+
<h3id="rejected-promises">Rejected promises handled from middleware and handlers</h3>
446
446
447
447
Request middleware and handlers that return rejected promises are now handled by forwarding the rejected value as an `Error` to the error handling middleware. This means that using `async` functions as middleware and handlers are easier than ever. When an error is thrown in an `async` function or a rejected promise is `await`ed inside an async function, those errors will be passed to the error handler as if calling `next(err)`.
448
448
449
449
Details of how Express handles errors is covered in the [error handling documentation](/en/guide/error-handling.html).
The `express.urlencoded` method makes the `extended` option `false` by default.
454
454
455
-
<h4id="app.listen">app.listen</h4>
455
+
<h3id="app.listen">app.listen</h3>
456
456
457
457
In Express 5, the `app.listen` method will invoke the user-provided callback function (if provided) when the server receives an error event. In Express 4, such errors would be thrown. This change shifts error-handling responsibility to the callback function in Express 5. If there is an error, it will be passed to the callback as an argument.
Das Objekt `app.router`, das in Express 4 entfernt wurde, ist in Express 5 wieder verfügbar. In der neuen Version fungiert dieses Objekt nur als Referenz zum Express-Basisrouter – im Gegensatz zu Express 3, wo die Anwendung dieses Objekt explizit laden musste.
472
472
473
-
<h4id="req.body">req.body</h4>
473
+
<h3id="req.body">req.body</h3>
474
474
475
475
The `req.body` property returns `undefined` when the body has not been parsed. In Express 4, it returns `{}` by default.
476
476
477
-
<h4id="req.host">req.host</h4>
477
+
<h3id="req.host">req.host</h3>
478
478
479
479
In Express 4 übergab die Funktion `req.host` nicht ordnungsgemäß eine eventuell vorhandene Portnummer. In Express 5 wird die Portnummer beibehalten.
480
480
481
-
<h4id="req.query">req.query</h4>
481
+
<h3id="req.query">req.query</h3>
482
482
483
483
The `req.query` property is no longer a writable property and is instead a getter. The default query parser has been changed from "extended" to "simple".
484
484
485
-
<h4id="res.clearCookie">res.clearCookie</h4>
485
+
<h3id="res.clearCookie">res.clearCookie</h3>
486
486
487
487
The `res.clearCookie` method ignores the `maxAge` and `expires` options provided by the user.
488
488
489
-
<h4id="res.status">res.status</h4>
489
+
<h3id="res.status">res.status</h3>
490
490
491
491
The `res.status` method only accepts integers in the range of `100` to `999`, following the behavior defined by Node.js, and it returns an error when the status code is not an integer.
492
492
493
-
<h4id="res.query">res.vary</h4>
493
+
<h3id="res.query">res.vary</h3>
494
494
495
495
The `res.vary` throws an error when the `field` argument is missing. In Express 4, if the argument was omitted, it gave a warning in the console
496
496
497
-
###Verbesserungen
497
+
## Verbesserungen
498
498
499
-
<h4id="res.render">res.render()</h4>
499
+
<h3id="res.render">res.render()</h3>
500
500
501
501
Diese Methode erzwingt nun asynchrones Verhalten für alle View-Engines, sodass durch View-Engines mit synchroner Implementierung verursachte Fehler vermieden werden, durch die die empfohlene Schnittstelle nicht verwendet werden konnte.
Copy file name to clipboardExpand all lines: de/index.md
+3-5Lines changed: 3 additions & 5 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -43,22 +43,20 @@ app.listen(port, () => {
43
43
{% endif %}
44
44
45
45
<sectionid="intro">
46
-
47
46
<divid="boxes"class="clearfix">
48
47
<div id="web-applications">
49
48
<h2>Web Applications</h2> Express is a minimal and flexible Node.js web application framework that provides a robust set of features for web and mobile applications.
50
49
</div>
51
50
<div id="apis">
52
-
<h2>APIs</h2> With a myriad of HTTP utility methods and middleware at your disposal, creating a robust API is quick and easy.
51
+
<h2>APIs</h2> With a myriad of HTTP utility methods and middleware at your disposal, creating a robust API is quick and easy.
53
52
</div>
54
53
<div id="performance">
55
-
<h2>Performance</h2> Express provides a thin layer of fundamental web application features, without obscuring Node.js features that you know and love.
54
+
<h2>Performance</h2> Express provides a thin layer of fundamental web application features, without obscuring Node.js features that you know and love.
56
55
</div>
57
56
<div id="middleware">
58
57
<h2>Middleware</h2>
59
58
Express is a lightweight and flexible routing framework with minimal core features
60
-
meant to be augmented through the use of Express <a href="{{ page.lang }}/resources/middleware.html">middleware</a> modules.
59
+
meant to be augmented through the use of Express <a href="{{ page.lang }}/resources/middleware.html">middleware</a> modules.
Copy file name to clipboardExpand all lines: de/starter/static-files.md
+2-2Lines changed: 2 additions & 2 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -18,7 +18,7 @@ express.static(root, [options])
18
18
```
19
19
20
20
The `root` argument specifies the root directory from which to serve static assets.
21
-
For more information on the `options` argument, see [express.static](/{{page.lang}}/4x/api.html#express.static).
21
+
For more information on the `options` argument, see [express.static](/{{page.lang}}/5x/api.html#express.static).
22
22
23
23
Beispiel: Verwenden Sie den folgenden Code, um Bilder, CSS-Dateien und JavaScript-Dateien in einem Verzeichnis namens `public` bereitzustellen:
24
24
@@ -52,7 +52,7 @@ For best results, [use a reverse proxy](/{{page.lang}}/advanced/best-practice-pe
52
52
{% endcapture %}
53
53
{% include admonitions/note.html content=alert_content %}
54
54
55
-
Wenn Sie ein Präfix für einen virtuellen Pfad (in dem der Pfad nicht wirklich im Dateisystem existiert) für Dateien festlegen wollen, die über die Funktion `express.static`bereitgestellt werden, [müssen Sie einen Mountpfad](/{{ page.lang }}/4x/api.html#app.use) für das Verzeichnis mit den statischen Assets wie unten gezeigt angeben:
55
+
To create a virtual path prefix (where the path does not actually exist in the file system) for files that are served by the `express.static`function, [specify a mount path](/{{ page.lang }}/5x/api.html#app.use) for the static directory, as shown below:
0 commit comments