Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Commit e6ecc13

Browse filesBrowse files
TrottBridgeAR
authored andcommitted
doc: improve synopsis.md
Many small improvements to synopsis.md to make it more concise, more clear, and more correct (punctuation, etc.). PR-URL: #28115 Reviewed-By: Daniel Bevenius <daniel.bevenius@gmail.com> Reviewed-By: Beth Griggs <Bethany.Griggs@uk.ibm.com> Reviewed-By: Colin Ihrig <cjihrig@gmail.com> Reviewed-By: Luigi Pinca <luigipinca@gmail.com> Reviewed-By: Trivikram Kamat <trivikr.dev@gmail.com>
1 parent c3243de commit e6ecc13
Copy full SHA for e6ecc13

File tree

Expand file treeCollapse file tree

1 file changed

+10
-21
lines changed
Open diff view settings
Filter options
Expand file treeCollapse file tree

1 file changed

+10
-21
lines changed
Open diff view settings
Collapse file

‎doc/api/synopsis.md‎

Copy file name to clipboardExpand all lines: doc/api/synopsis.md
+10-21Lines changed: 10 additions & 21 deletions
  • Display the source diff
  • Display the rich diff
Original file line numberDiff line numberDiff line change
@@ -5,31 +5,23 @@
55

66
`node [options] [V8 options] [script.js | -e "script" | - ] [arguments]`
77

8-
Please see the [Command Line Options][] document for information about
9-
different options and ways to run scripts with Node.js.
8+
Please see the [Command Line Options][] document for more information.
109

1110
## Example
1211
An example of a [web server][] written with Node.js which responds with
1312
`'Hello, World!'`:
1413

15-
Commands displayed in this document are shown starting with `$` or `>`
16-
to replicate how they would appear in a user's terminal.
17-
Do not include the `$` and `>` characters. They are there to
18-
indicate the start of each command.
14+
Commands in this document start with `$` or `>` to replicate how they would
15+
appear in a user's terminal. Do not include the `$` and `>` characters. They are
16+
there to show the start of each command.
1917

20-
There are many tutorials and examples that follow this
21-
convention: `$` or `>` for commands run as a regular user, and `#`
22-
for commands that should be executed as an administrator.
18+
Lines that don’t start with `$` or `>` character show the output of the previous
19+
command.
2320

24-
Lines that don’t start with `$` or `>` character are typically showing
25-
the output of the previous command.
26-
27-
Firstly, make sure to have downloaded and installed Node.js.
28-
See [this guide][] for further install information.
21+
First, make sure to have downloaded and installed Node.js. See [this guide][]
22+
for further install information.
2923

3024
Now, create an empty project folder called `projects`, then navigate into it.
31-
The project folder can be named based on the user's current project title, but
32-
this example will use `projects` as the project folder.
3325

3426
Linux and Mac:
3527

@@ -75,14 +67,13 @@ server.listen(port, hostname, () => {
7567
});
7668
```
7769

78-
Save the file, go back to the terminal window enter the following command:
70+
Save the file, go back to the terminal window, and enter the following command:
7971

8072
```console
8173
$ node hello-world.js
8274
```
8375

84-
An output like this should appear in the terminal to indicate Node.js
85-
server is running:
76+
Output like this should appear in the terminal:
8677

8778
```console
8879
Server running at http://127.0.0.1:3000/
@@ -93,8 +84,6 @@ Now, open any preferred web browser and visit `http://127.0.0.1:3000`.
9384
If the browser displays the string `Hello, World!`, that indicates
9485
the server is working.
9586

96-
Many of the examples in the documentation can be run similarly.
97-
9887
[Command Line Options]: cli.html#cli_command_line_options
9988
[this guide]: https://nodejs.org/en/download/package-manager/
10089
[web server]: http.html

0 commit comments

Comments
0 (0)
Morty Proxy This is a proxified and sanitized view of the page, visit original site.