From 9542844febd6c0ada1fd9e0649bf5223bea01744 Mon Sep 17 00:00:00 2001 From: Piotr Mionskowski Date: Fri, 1 Sep 2017 19:34:01 +0200 Subject: [PATCH] doc: `readFileSync` instead of `fs.readFileSync` MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit The ALPN negotiation sample uses `fs.readFileSync` whereas `readFileSync` is imported into top level variable. PR-URL: https://github.com/nodejs/node/pull/15137 Reviewed-By: Benjamin Gruenbaum Reviewed-By: James M Snell Reviewed-By: Vse Mozhet Byt Reviewed-By: Michaƫl Zasso Reviewed-By: Refael Ackermann --- doc/api/http2.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/doc/api/http2.md b/doc/api/http2.md index 67a3d400d0571e..5f964d1643c1c3 100755 --- a/doc/api/http2.md +++ b/doc/api/http2.md @@ -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 },