mirror of
https://github.com/nodejs/node.git
synced 2026-11-27 17:52:27 -05:00
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: https://github.com/nodejs/node/pull/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>
This commit is contained in:
1 parent
77f5b69840
commit
ad06168a5c
1 file changed
+3
-3
+3
-3
@@ -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,
|
||||
@@ -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])`
|
||||
@@ -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])`
|
||||
|
||||
Reference in new issue
Block a user