mirror of
https://github.com/zumbiepig/MineXLauncher.git
synced 2025-06-26 10:05:10 +00:00
,
This commit is contained in:
15
index.ts
15
index.ts
@@ -57,7 +57,14 @@ app.use(async (err, req, res, next) => {
|
||||
next();
|
||||
});
|
||||
|
||||
app.listen(PORT, async () => {
|
||||
debugLogger('Server started.');
|
||||
console.log(chalk.green(`Server is running on port ${PORT}`));
|
||||
});
|
||||
app
|
||||
.listen(PORT, async () => {
|
||||
debugLogger('Server started.');
|
||||
console.log(chalk.green(`Server is running on port ${PORT}`));
|
||||
})
|
||||
.on('error', (error) => {
|
||||
if (error.code === 'EADDRINUSE') {
|
||||
console.error(chalk.red('EADDRINUSE') + chalk.gray(': ') + chalk.bold(`Failed to start server. Is port ${PORT} in use?`));
|
||||
process.exit(1);
|
||||
}
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user