Skip to content

Commit

Permalink
Bug fix: Explicitly specify localhost to ensure server is listening o…
Browse files Browse the repository at this point in the history
…n tcp and not tcp6
  • Loading branch information
MKHenson committed Jun 23, 2016
1 parent 1fcaf80 commit 42224fa
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/startup.ts
Original file line number Diff line number Diff line change
Expand Up @@ -95,7 +95,7 @@ openDB(config).then(function (db)

// Start node server.js
var httpServer = http.createServer(app);
httpServer.listen(config.portHTTP);
httpServer.listen( {port: config.portHTTP, host: "localhost"} );
winston.info(`Listening on HTTP port ${config.portHTTP}`, { process: process.pid });

// If we use SSL then start listening for that as well
Expand Down Expand Up @@ -133,7 +133,7 @@ openDB(config).then(function (db)
winston.info(`Attempting to start SSL server...`, { process: process.pid });

var httpsServer = https.createServer({ key: privkey, cert: theCert, passphrase: config.sslPassPhrase, ca: caChain }, app);
httpsServer.listen(port);
httpsServer.listen( {port: port, host: "localhost"} );

winston.info(`Listening on HTTPS port ${port}`, { process: process.pid });
}
Expand Down

0 comments on commit 42224fa

Please sign in to comment.