Skip to content
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions en/starter/hello-world.md
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@
const app = express()
const port = 3000

//app.get() is a method used to define a route that responds to HTTP GET requests.

Check failure on line 20 in en/starter/hello-world.md

View workflow job for this annotation

GitHub Actions / test

Expected space or tab after '//' in comment
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

What do you think if we add something like this:

const express = require('express')
const app = express()
const port = 3000

// Define a route handler for GET requests to the root URL ('/')
// When someone visits http://localhost:3000/, this function runs
app.get('/', (req, res) => {
  res.send('Hello World!')  // Send back the response
})

// Start the server and listen for incoming requests on the specified port
app.listen(port, () => {
  console.log(`Example app listening on port ${port}`)
})

cc: @efekrskl @ShubhamOulkar @expressjs/docs-wg

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looking more in depth, the hello world page contains some extra details outside the example, which already cover these details. I would say we can close the PR.

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I agree, maybe it made sense to add some commentary directly in the code example, but I’m inclined to close the PR.

app.get('/', (req, res) => {
res.send('Hello World!')
})
Expand Down
Loading