Skip to content

Commit

Permalink
server: ditch unmaintained "spdy"
Browse files Browse the repository at this point in the history
HTTP/2 support can be restored after migration to fastify.

Bug: #524
  • Loading branch information
jesec committed May 11, 2022
1 parent d540d36 commit 2a1fe80
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 25 deletions.
20 changes: 0 additions & 20 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 0 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -112,7 +112,6 @@
"@types/react-router-dom": "^5.3.3",
"@types/react-transition-group": "^4.4.4",
"@types/react-window": "^1.8.5",
"@types/spdy": "^3.4.5",
"@types/supertest": "^2.0.12",
"@types/tar-fs": "^2.0.1",
"@types/yargs": "^17.0.10",
Expand Down Expand Up @@ -194,7 +193,6 @@
"sass-loader": "^12.6.0",
"saxen": "^8.1.2",
"source-map-loader": "^3.0.1",
"spdy": "^4.0.2",
"style-loader": "^3.3.1",
"supertest": "^6.2.3",
"tar-fs": "^2.1.1",
Expand Down
8 changes: 5 additions & 3 deletions server/bin/web-server.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ import chalk from 'chalk';
import debug from 'debug';
import fs from 'fs';
import http from 'http';
import spdy from 'spdy';
import https from 'https';

import app from '../app';
import config from '../../config';
Expand Down Expand Up @@ -37,15 +37,17 @@ const startWebServer = () => {
app.set('host', host);

// Create HTTP or HTTPS server.
let server: http.Server | spdy.Server;
let server: http.Server | https.Server;

if (useSSL) {
if (!config.sslKey || !config.sslCert) {
console.error('Cannot start HTTPS server, `sslKey` or `sslCert` is missing in config.js.');
process.exit(1);
}

server = spdy.createServer(
server = http.createServer();

server = https.createServer(
{
key: fs.readFileSync(config.sslKey),
cert: fs.readFileSync(config.sslCert),
Expand Down

0 comments on commit 2a1fe80

Please sign in to comment.