From ad87375ff696fed0c9bc2f2195230a2abaad7d30 Mon Sep 17 00:00:00 2001 From: b-gonzalez <75147430+b-gonzalez@users.noreply.github.com> Date: Fri, 27 Jun 2025 09:34:44 -0400 Subject: [PATCH] Updated app.listen() in the Express example to use a callback function so that it is consistent with the example on the Express.js website. Closes #6594. --- Readme.md | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/Readme.md b/Readme.md index d7e99de5c15..4ad6dd23ef5 100644 --- a/Readme.md +++ b/Readme.md @@ -35,12 +35,15 @@ import express from 'express' const app = express() +const port = 3000 app.get('/', (req, res) => { res.send('Hello World') }) -app.listen(3000) +app.listen(port, () => { + console.log(`Example app listening on port ${port}`) +}) ``` ## Installation