Skip to content

Commit de088ee

Browse files
committed
feat: http2 support
1 parent 00f4fba commit de088ee

File tree

1 file changed

+2
-4
lines changed

1 file changed

+2
-4
lines changed

index.js

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

65
const Cabin = require('cabin');
@@ -160,8 +159,7 @@ class API {
160159

161160
// start server on either http or https
162161
if (this.config.protocol === 'https')
163-
server = https.createServer(this.config.ssl, app.callback());
164-
// server = http2.createSecureServer(this.config.ssl, app.callback());
162+
server = http2.createSecureServer(this.config.ssl, app.callback());
165163
else server = http.createServer(app.callback());
166164

167165
// expose app, server, client

0 commit comments

Comments
 (0)