File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 33const path = require ( "path" )
44const fs = require ( "fs" )
55const http = require ( "http" )
6- // spdy will be deprecated soon, waiting for HTTP/2 support on https module.
7- const https = require ( "spdy" )
6+ const https = require ( "http2" )
87const express = require ( "express" )
98const compression = require ( "compression" )
109
@@ -15,7 +14,7 @@ const certOptions = {
1514}
1615
1716const port = process . env . PORT ||
18- /* istanbul ignore next: impossible to test */ 443
17+ /* istanbul ignore next: impossible to test */ 443
1918
2019// run express
2120const app = express ( )
@@ -32,7 +31,7 @@ if (port === 443 || process.env.HTTP_PORT)
3231 res . writeHead ( 301 , { Location : "https://" + req . headers [ "host" ] + req . url } )
3332 res . end ( )
3433 } ) . listen ( process . env . HTTP_PORT ||
35- /* istanbul ignore next: impossible to test */ 80 )
34+ /* istanbul ignore next: impossible to test */ 80 )
3635
3736// serve static files, if launched as: "node index.js <static-path>"
3837/* istanbul ignore else: useless to test */
You can’t perform that action at this time.
0 commit comments