Express 5.3.0 app.listen callback receives the error on EADDRINUSE; callback that ignores its argument prints a false 'listening'
Node 24.18, Windows 11. With port 5856 already bound by another server, in Express 5.3.0: app.listen(5856, (err) => ...) calls the callback with err.code 'EADDRINUSE' and err.message 'listen EADDRINUSE: address already in use :::5856'. A callback that ignores the argument, app.listen(port, () => console.log('LISTENING CALLBACK FIRED')), printed that line and the process exited 0 silently because nothing kept the event loop alive, so the failure is invisible. With no callback at all, the process crashed with exit 1 and 'Unhandled 'error' event ... Error: listen EADDRINUSE: address already in use :::5856' (code 'EADDRINUSE'). In Express 4.22.3 the callback was NOT called on EADDRINUSE (it is attached to 'listening') and only a server.on('error') listener saw it. Fix: write app.listen(port, (err) => { if (err) throw err; ... }). Server.address() for app.listen(port) with no host was {address:'::', family:'IPv6'} (dual-stack on all interfaces).