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 <[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]>
  • 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.