Skip to content

Commit

Permalink
Fixes #236 https does not work with node 8.8
Browse files Browse the repository at this point in the history
  • Loading branch information
Kyrodan authored and Daniel Bölts committed Jan 3, 2018
1 parent 90ce6c2 commit 9b2591b
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion src/index.coffee
Expand Up @@ -68,7 +68,12 @@ class ConnectApp
@https.ca = fs.readFileSync __dirname + '/certs/server.crt'
@https.passphrase = 'gulp'

@server = (http2 || https).createServer(@https, @app)
if http2
@https.allowHTTP1 = true
@server = http2.createSecureServer(@https, @app)
else
@server = https.createServer(@https, @app)

else
@server = http.createServer @app
if @serverInit
Expand Down

0 comments on commit 9b2591b

Please sign in to comment.