Skip to content

Commit

Permalink
refactor: use fs/promises
Browse files Browse the repository at this point in the history
  • Loading branch information
dnalborczyk committed Aug 1, 2022
1 parent 5e101a6 commit 7019d28
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/events/http/HttpServer.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import { Buffer } from 'node:buffer'
import { readFileSync } from 'node:fs'
import { readFile } from 'node:fs/promises'
import { createRequire } from 'node:module'
import { join, resolve } from 'node:path'
import { exit } from 'node:process'
Expand Down Expand Up @@ -82,8 +82,8 @@ export default class HttpServer {
// HTTPS support
if (typeof httpsProtocol === 'string' && httpsProtocol.length > 0) {
serverOptions.tls = {
cert: readFileSync(resolve(httpsProtocol, 'cert.pem'), 'ascii'),
key: readFileSync(resolve(httpsProtocol, 'key.pem'), 'ascii'),
cert: readFile(resolve(httpsProtocol, 'cert.pem'), 'ascii'),
key: readFile(resolve(httpsProtocol, 'key.pem'), 'ascii'),
}
}

Expand Down

0 comments on commit 7019d28

Please sign in to comment.