From c12adfac16561937ff814a543ca1ef9557a90639 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. --- bin/signalk-server | 2 +- package.json | 1 - src/index.js | 4 ++-- 3 files changed, 3 insertions(+), 4 deletions(-) diff --git a/bin/signalk-server b/bin/signalk-server index 03912d65a..fcb2c0986 100755 --- a/bin/signalk-server +++ b/bin/signalk-server @@ -1,4 +1,4 @@ -#!/usr/bin/env node +#!/usr/bin/env node --trace-deprecation /* * Copyright 2014-2015 Fabian Tollenaar 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