Skip to content

Show it a video you love. Get a new video in the same style. An AI crew (Claude Code or Codex) plans, builds and reviews it with you.

fix: show a clear message when the port is already in use

bluzernameed3dab5d7f28
diff --git a/app/server/index.ts b/app/server/index.ts
index 6576ad2..7d5145c 100644
--- a/app/server/index.ts
+++ b/app/server/index.ts
@@ -127,4 +127,9 @@ const dist = join(import.meta.dirname, '..', 'dist');
if (existsSync(dist)) { app.use(express.static(dist)); app.get(/^\/(?!api|files).*/, (req, res) => res.sendFile(join(dist, 'index.html'))); }
J.recoverOrphans();
-app.listen(PORT, '127.0.0.1', () => console.log(`ReelMimic → http://localhost:${PORT}`));
+const server = app.listen(PORT, '127.0.0.1', () => console.log(`ReelMimic → http://localhost:${PORT}`));
+server.on('error', (err: NodeJS.ErrnoException) => {
+ if (err.code !== 'EADDRINUSE') throw err;
+ console.error(`Port ${PORT} is already in use. ReelMimic may already be open at http://localhost:${PORT}. Set PORT to use another port.`);
+ process.exit(1);
+});