mirror of
https://github.com/n8n-io/n8n.git
synced 2024-12-24 04:04:06 -08:00
⚡ Added fallback when port in use (#2524)
* Added fallback when port in use
* ⚡ Minor Fixes
This commit is contained in:
parent
2125f25791
commit
8d2c6cc073
|
@ -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(
|
||||||
|
|
Loading…
Reference in a new issue