From 1b109c8b4ddbb7408201b0019dd2d8a79cc29e7b Mon Sep 17 00:00:00 2001 From: Teppo Kurki Date: Thu, 4 Nov 2021 21:11:57 +0200 Subject: [PATCH] feature: remove HTTP/2 support The spdy module appears to be incompatible with Node >=15 as of this writing https://github.com/spdy-http2/node-spdy/issues/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. --- package.json | 1 - src/index.js | 4 ++-- 2 files changed, 2 insertions(+), 3 deletions(-) diff --git a/package.json b/package.json index e649dc06e..26db3f06e 100644 --- a/package.json +++ b/package.json @@ -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", diff --git a/src/index.js b/src/index.js index d1c06e5f8..d4b49d413 100644 --- a/src/index.js +++ b/src/index.js @@ -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') @@ -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