From 1c05b5c1e1f19dab3396f1cbbb9626ac28d5aab4 Mon Sep 17 00:00:00 2001 From: marceloalvesdesign Date: Thu, 25 Jun 2026 21:25:32 +0900 Subject: [PATCH] Update introduction-to-nodejs.md - Fix inconsistency between the code snippet that calls `end()` with 'Hello World' with the example above. Remove newline. - Add missing *the* before "mjs version" Signed-off-by: marceloalvesdesign --- pages/getting-started/introduction-to-nodejs.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pages/getting-started/introduction-to-nodejs.md b/pages/getting-started/introduction-to-nodejs.md index 6bc4fd2..f267316 100644 --- a/pages/getting-started/introduction-to-nodejs.md +++ b/pages/getting-started/introduction-to-nodejs.md @@ -57,7 +57,7 @@ server.listen(port, hostname, () => { ``` To run this snippet, save it as a `server.js` file and run `node server.js` in your terminal. -If you use mjs version of the code, you should save it as a `server.mjs` file and run `node server.mjs` in your terminal. +If you use the mjs version of the code, you should save it as a `server.mjs` file and run `node server.mjs` in your terminal. This code first includes the Node.js [`http` module](https://nodejs.org/api/http.html). @@ -92,7 +92,7 @@ res.setHeader('Content-Type', 'text/plain'); and we close the response, adding the content as an argument to `end()`: ```js -res.end('Hello World\n'); +res.end('Hello World'); ``` If you haven't already done so, [download](https://nodejs.org/en/download) Node.js.