Skip to content

Commit c425a6f

Browse files
authored
doc: use number which is bigger than 1024 as port in http2
With 80 port, user should run example with root permission. To avoid such situation, use 8000 or 8443 as port number in example of http2. PR-URL: #46938 Reviewed-By: Matteo Collina <[email protected]> Reviewed-By: Colin Ihrig <[email protected]> Reviewed-By: Paolo Insogna <[email protected]> Reviewed-By: Tobias Nießen <[email protected]> Reviewed-By: Luigi Pinca <[email protected]> Reviewed-By: Rafael Gonzaga <[email protected]>
1 parent 7e6bc93 commit c425a6f

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

doc/api/http2.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -354,7 +354,7 @@ server.on('stream', (stream, headers) => {
354354
stream.end('<h1>Hello World</h1>');
355355
});
356356

357-
server.listen(80);
357+
server.listen(8000);
358358
```
359359

360360
Even though HTTP/2 streams and network sockets are not in a 1:1 correspondence,
@@ -2532,7 +2532,7 @@ server.on('stream', (stream, headers) => {
25322532
stream.end('<h1>Hello World</h1>');
25332533
});
25342534

2535-
server.listen(80);
2535+
server.listen(8000);
25362536
```
25372537

25382538
### `http2.createSecureServer(options[, onRequestHandler])`
@@ -2673,7 +2673,7 @@ server.on('stream', (stream, headers) => {
26732673
stream.end('<h1>Hello World</h1>');
26742674
});
26752675

2676-
server.listen(80);
2676+
server.listen(8443);
26772677
```
26782678

26792679
### `http2.connect(authority[, options][, listener])`

0 commit comments

Comments
 (0)