Skip to content

Commit 30e2241

Browse files
committed
fix: switch http2 to https due to spdy issues and http2 incompatibility with superagent out of box
1 parent 995ffeb commit 30e2241

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

index.js

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
const http = require('http');
2-
const http2 = require('http2');
2+
const https = require('https');
33
const util = require('util');
44

55
const Cabin = require('cabin');
@@ -175,10 +175,10 @@ class API {
175175
else app.use(this.config.routes);
176176
}
177177

178-
// start server on either http or http2
178+
// start server on either http or https
179179
const server =
180180
this.config.protocol === 'https'
181-
? http2.createSecureServer(this.config.ssl, app.callback())
181+
? https.createServer(this.config.ssl, app.callback())
182182
: http.createServer(app.callback());
183183

184184
// expose app, server, client

0 commit comments

Comments
 (0)