Skip to content

Commit 95a107e

Browse files
committed
Update README.md
1 parent 22a0886 commit 95a107e

File tree

1 file changed

+5
-2
lines changed

1 file changed

+5
-2
lines changed

README.md

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1613,13 +1613,16 @@ Middleware functions that return a Promise will call `next(value)` when they rej
16131613

16141614
## Q. Explain the use of next in Node.js?
16151615

1616-
The next function is a function in the Express router which, when invoked, executes the middleware succeeding the current middleware.
1616+
The **next** is a function in the Express router which executes the middleware succeeding the current middleware.
16171617

1618-
**Example:** Middleware function myLogger
1618+
**Example:**
16191619

16201620
To load the middleware function, call `app.use()`, specifying the middleware function. For example, the following code loads the **myLogger** middleware function before the route to the root path (/).
16211621

16221622
```js
1623+
/**
1624+
* myLogger
1625+
*/
16231626
const express = require("express");
16241627
const app = express();
16251628

0 commit comments

Comments
 (0)