Skip to content

Commit

Permalink
Added handle to another errors
Browse files Browse the repository at this point in the history
  • Loading branch information
KiritoDv committed Mar 9, 2020
1 parent a5f54d1 commit 9840e3b
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/main.ts
Original file line number Diff line number Diff line change
Expand Up @@ -42,9 +42,10 @@ app.get('/maven/*', (req, res) => {
app.listen(port, () => {
console.log("[UVLib] Started on port: " + port);
}).on('error', (err) => {
console.log(err.message)
if(err.message.includes("EADDRINUSE")){
console.log("[UVLib] There was an error starting the server");
console.log("[UVLib] The port is already in use try changing it with --port=1234");
}else{
console.log("[UVLib] There was an error starting the server");
}
});

0 comments on commit 9840e3b

Please sign in to comment.