Skip to content

Commit

Permalink
doc: readFileSync instead of fs.readFileSync
Browse files Browse the repository at this point in the history
The ALPN negotiation sample uses `fs.readFileSync` whereas
`readFileSync` is imported into top level variable.

PR-URL: #15137
Reviewed-By: Benjamin Gruenbaum <benjamingr@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Vse Mozhet Byt <vsemozhetbyt@gmail.com>
Reviewed-By: Michaël Zasso <targos@protonmail.com>
Reviewed-By: Refael Ackermann <refack@gmail.com>
  • Loading branch information
miensol authored and refack committed Sep 1, 2017
1 parent dd52cad commit ec599b8
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions doc/api/http2.md
Original file line number Diff line number Diff line change
Expand Up @@ -1957,8 +1957,8 @@ The following example creates a server that supports both protocols:
const { createSecureServer } = require('http2');
const { readFileSync } = require('fs');

const cert = fs.readFileSync('./cert.pem');
const key = fs.readFileSync('./key.pem');
const cert = readFileSync('./cert.pem');
const key = readFileSync('./key.pem');

const server = createSecureServer(
{ cert, key, allowHTTP1: true },
Expand Down

0 comments on commit ec599b8

Please sign in to comment.