Custom port

This commit is contained in:
2026-01-16 14:55:17 +01:00
parent 08e9ebbbb4
commit 20c0b8c9b8

View File

@@ -679,13 +679,7 @@ const app = new Elysia()
} catch { } catch {
return new Response('Frontend not built. Run `bun run build`', { status: 503 }); return new Response('Frontend not built. Run `bun run build`', { status: 503 });
} }
})
logger.info(`Backend server running`, { port: app.server?.port, url: `http://localhost:${app.server?.port}` });
logger.info(`API endpoints available`, { url: `http://localhost:${app.server?.port}/api` });
// Start server - uses PORT environment variable if set, otherwise defaults to 3001 // Start server - uses PORT environment variable if set, otherwise defaults to 3001
const PORT = process.env.PORT || 3001; .listen(process.env.PORT || 3001);
.listen(PORT);
export default app;