From 2f0705b9e7fc54a3f17e88d3269a0b65d26d44ab Mon Sep 17 00:00:00 2001 From: Deokjin Kim Date: Fri, 3 Mar 2023 23:05:25 +0900 Subject: [PATCH] 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. --- doc/api/http2.md | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/doc/api/http2.md b/doc/api/http2.md index 1b2d7c246367d2..61f2bd8ec8f1d9 100644 --- a/doc/api/http2.md +++ b/doc/api/http2.md @@ -354,7 +354,7 @@ server.on('stream', (stream, headers) => { stream.end('

Hello World

'); }); -server.listen(80); +server.listen(8000); ``` Even though HTTP/2 streams and network sockets are not in a 1:1 correspondence, @@ -2532,7 +2532,7 @@ server.on('stream', (stream, headers) => { stream.end('

Hello World

'); }); -server.listen(80); +server.listen(8000); ``` ### `http2.createSecureServer(options[, onRequestHandler])` @@ -2673,7 +2673,7 @@ server.on('stream', (stream, headers) => { stream.end('

Hello World

'); }); -server.listen(80); +server.listen(8443); ``` ### `http2.connect(authority[, options][, listener])`