Skip to content

Commit 6d930ec

Browse files
Merge pull request #135 from olaservo/add-server-startup-logging
Add server startup logging
2 parents 688752e + 9c3fee1 commit 6d930ec

File tree

1 file changed

+14
-1
lines changed

1 file changed

+14
-1
lines changed

server/src/index.ts

Lines changed: 14 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -181,4 +181,17 @@ app.get("/config", (req, res) => {
181181
});
182182

183183
const PORT = process.env.PORT || 3000;
184-
app.listen(PORT, () => {});
184+
185+
try {
186+
const server = app.listen(PORT);
187+
188+
server.on('listening', () => {
189+
const addr = server.address();
190+
const port = typeof addr === 'string' ? addr : addr?.port;
191+
console.log(`Proxy server listening on port ${port}`);
192+
});
193+
194+
} catch (error) {
195+
console.error('Failed to start server:', error);
196+
process.exit(1);
197+
}

0 commit comments

Comments
 (0)