Skip to content
Closed
Changes from all commits
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
Use readFileSync instead of fs.readFileSync
The ALPN negotiation sample uses `fs.readFileSync` whereas `readFileSync` is imported into top level variable.
  • Loading branch information
miensol authored Sep 1, 2017
commit 7fad0ebd3de1646891849f2b06e5b72c23d41776
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