Skip to content

Commit

Permalink
Prevent warmserver from blocking the port from being attached (github…
Browse files Browse the repository at this point in the history
…#16150)

Co-authored-by: Chiedo <chiedo@users.noreply.github.com>
  • Loading branch information
chiedo and chiedo authored Oct 21, 2020
1 parent 2cf68d7 commit 8a26395
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion server.js
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ if (!module.parent) {
portUsed.check(port).then(async status => {
if (status === false) {
// If in production, warm the server at the start
if (process.env.NODE_ENV === 'production') await warmServer()
if (process.env.NODE_ENV === 'production') warmServer()

// workaround for https://github.com/expressjs/express/issues/1101
const server = require('http').createServer(app)
Expand Down

0 comments on commit 8a26395

Please sign in to comment.