Skip to content

Commit 9a11b0d

Browse files
committed
refactor: imports
1 parent 12173ab commit 9a11b0d

File tree

1 file changed

+3
-4
lines changed

1 file changed

+3
-4
lines changed

lib/Server.js

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -549,6 +549,9 @@ class Server {
549549
}
550550

551551
createServer() {
552+
const https = require('https');
553+
const http = require('http');
554+
552555
if (this.options.https) {
553556
if (this.options.http2) {
554557
// TODO: we need to replace spdy with http2 which is an internal module
@@ -562,13 +565,9 @@ class Server {
562565
this.app
563566
);
564567
} else {
565-
const https = require('https');
566-
567568
this.server = https.createServer(this.options.https, this.app);
568569
}
569570
} else {
570-
const http = require('http');
571-
572571
this.server = http.createServer(this.app);
573572
}
574573

0 commit comments

Comments
 (0)