Skip to content

Commit

Permalink
Merge pull request #1179 from kethinov/easier-to-read-port-error
Browse files Browse the repository at this point in the history
Easier to read port error
  • Loading branch information
kethinov authored Jul 24, 2022
2 parents f91a138 + 5f66226 commit 9a9cfef
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

## Next version

- Put your changes here...
- Some error message copyediting.

## 0.20.0

Expand Down
4 changes: 2 additions & 2 deletions roosevelt.js
Original file line number Diff line number Diff line change
Expand Up @@ -370,10 +370,10 @@ module.exports = (params, schema) => {

function serverPush (server, serverPort, serverFormat) {
servers.push(server.listen(serverPort, (params.localhostOnly ? 'localhost' : null), startupCallback(serverFormat, serverPort)).on('error', (err) => {
logger.error(err)
if (err.message.includes('EADDRINUSE')) {
logger.error(`Another process is using port ${serverPort}. Either kill that process or change this app's port number.`)
logger.error(`Another process is using port ${serverPort}. Either kill that process or change this app's port number.`.bold)
}
logger.error(err)
process.exit(1)
}))
}
Expand Down

0 comments on commit 9a9cfef

Please sign in to comment.