Skip to content

Commit

Permalink
doc: use number which is bigger than 1024 as port in http2
Browse files Browse the repository at this point in the history
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 <matteo.collina@gmail.com>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Paolo Insogna <paolo@cowtech.it>
Reviewed-By: Tobias Nießen <tniessen@tnie.de>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Reviewed-By: Rafael Gonzaga <rafael.nunu@hotmail.com>
  • Loading branch information
deokjinkim authored and danielleadams committed Apr 11, 2023
1 parent 77f5b69 commit ad06168
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions doc/api/http2.md
Original file line number Diff line number Diff line change
Expand Up @@ -354,7 +354,7 @@ server.on('stream', (stream, headers) => {
stream.end('<h1>Hello World</h1>');
});

server.listen(80);
server.listen(8000);
```

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

server.listen(80);
server.listen(8000);
```

### `http2.createSecureServer(options[, onRequestHandler])`
Expand Down Expand Up @@ -2659,7 +2659,7 @@ server.on('stream', (stream, headers) => {
stream.end('<h1>Hello World</h1>');
});

server.listen(80);
server.listen(8443);
```

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

0 comments on commit ad06168

Please sign in to comment.