mirror of
https://github.com/Abdulazizzn/n8n-enterprise-unlocked.git
synced 2025-12-18 10:31:15 +00:00
⚡ Added fallback when port in use (#2524)
* Added fallback when port in use
* ⚡ Minor Fixes
This commit is contained in:
@@ -2905,6 +2905,15 @@ export async function start(): Promise<void> {
|
|||||||
InternalHooksManager.getInstance().onServerStarted(diagnosticInfo, workflow?.createdAt),
|
InternalHooksManager.getInstance().onServerStarted(diagnosticInfo, workflow?.createdAt),
|
||||||
);
|
);
|
||||||
});
|
});
|
||||||
|
|
||||||
|
server.on('error', (error: Error & { code: string }) => {
|
||||||
|
if (error.code === 'EADDRINUSE') {
|
||||||
|
console.log(
|
||||||
|
`n8n's port ${PORT} is already in use. Do you have another instance of n8n running already?`,
|
||||||
|
);
|
||||||
|
process.exit(1);
|
||||||
|
}
|
||||||
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
async function getExecutionsCount(
|
async function getExecutionsCount(
|
||||||
|
|||||||
Reference in New Issue
Block a user