Skip to content

Commit

Permalink
feature: remove HTTP/2 support
Browse files Browse the repository at this point in the history
The spdy module appears to be incompatible with Node >=15
as of this writing

spdy-http2/node-spdy#380

As HTTP/2 is relevant only for SSL connections and I
think that is pretty rarely used I think a pretty safe
and convenient option is to remove HTTP/2 support
and spdy module.
  • Loading branch information
tkurki committed Nov 16, 2021
1 parent 1c5741c commit 1b109c8
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 3 deletions.
1 change: 0 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -112,7 +112,6 @@
"pem": "^1.14.3",
"primus": "^7.0.0",
"semver": "^7.1.1",
"spdy": "^4.0.0",
"split": "^1.0.0",
"stat-mode": "^1.0.0",
"unzipper": "^0.10.10",
Expand Down
4 changes: 2 additions & 2 deletions src/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ const debug = require('debug')('signalk-server')
const DeltaCache = require('./deltacache')
const path = require('path')
const http = require('http')
const spdy = require('spdy')
const https = require('https')
const { FullSignalK, getSourceId } = require('@signalk/signalk-schema')
const SubscriptionManager = require('./subscriptionmanager')
const ports = require('./ports')
Expand Down Expand Up @@ -392,7 +392,7 @@ function createServer(app, cb) {
cb(err)
} else {
debug('Starting server to serve both http and https')
cb(null, spdy.createServer(options, app))
cb(null, https.createServer(options, app))
}
})
return
Expand Down

0 comments on commit 1b109c8

Please sign in to comment.