Skip to content
Closed
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 6 additions & 0 deletions doc/api/http2.md
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,12 @@ server.on('stream', (stream, headers) => {
server.listen(80);
```

Note that this is an HTTP server and does not support HTTPS.
Copy link
Contributor

@mscdex mscdex Aug 7, 2017

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

s/this/the above example/

Also, I think using the terms HTTP and HTTPS could be confusing since I would bet most people would associate those terms with HTTP 1.x?

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

+1 ... s/HTTP server/HTTP2 server

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Or perhaps better yet: 'HTTP/2 server', which is used elsewhere in this document.

This is significant as most browsers support HTTP/2 only on HTTPS.
To make the above server available for browsers, replace `http2.createServer()`
with
`http2.createSecureServer({key: /* your SSL key */, cert: /* your SSL cert */})`.

The following illustrates an HTTP/2 client:

```js
Expand Down