Permalink
Browse files

doc: `readFileSync` instead of `fs.readFileSync`

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 MylesBorins committed Sep 1, 2017
1 parent eee2aa6 commit 9542844febd6c0ada1fd9e0649bf5223bea01744
Showing with 2 additions and 2 deletions.
  1. +2 −2 doc/api/http2.md
View
@@ -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 },

0 comments on commit 9542844

Please sign in to comment.