Node.js - Error Handling Patterns
Given this code snippet, what will be the output when an uncaught exception occurs?
const http = require('http');
const server = http.createServer((req, res) => {
throw new Error('Oops');
});
process.on('uncaughtException', (err) => {
console.log('Error caught:', err.message);
process.exit(1);
});
server.listen(3000);
// A request is made to the server
