From ad06168a5ce17551bb46d0fc5ae8251cf26f9da8 Mon Sep 17 00:00:00 2001 From: Deokjin Kim Date: Mon, 6 Mar 2023 09:29:17 +0900 Subject: [PATCH] doc: use number which is bigger than 1024 as port in http2 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 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 Reviewed-By: Colin Ihrig Reviewed-By: Paolo Insogna Reviewed-By: Tobias Nießen Reviewed-By: Luigi Pinca Reviewed-By: Rafael Gonzaga --- 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 71aeeb536316ce..02b2e71381a47b 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, @@ -2518,7 +2518,7 @@ server.on('stream', (stream, headers) => { stream.end('

Hello World

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

Hello World

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