Skip to content

Commit e6ecc13

Browse 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 <[email protected]> Reviewed-By: Beth Griggs <[email protected]> Reviewed-By: Colin Ihrig <[email protected]> Reviewed-By: Luigi Pinca <[email protected]> Reviewed-By: Trivikram Kamat <[email protected]>
1 parent c3243de commit e6ecc13

File tree

1 file changed

+10
-21
lines changed

1 file changed

+10
-21
lines changed

doc/api/synopsis.md

+10-21
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)