Closed imlautaro closed 3 months ago
I know it is frustrating with how js single threads and Node.js errors happen but it is not something related to Nitro.
import { createServer } from 'node:http'
createServer((req, res) => {
res.writeHead(200, { 'Content-Type': 'text/plain' })
const response = [];
while (true) {
response.push("Hello, Nitro!");
}
// res.end('Hello World\n')
}).listen(3000, () => console.log('Server running on http://localhost:3000/'))
This pure Node.js code leads to exactly same
Oh, okay. At least that's good to know. Thanks!
Environment
Node version: 20.11.0 Nitro version: 2.9.6
Reproduction
You can just create an infinite loop in any event handler:
Describe the bug
When you create an infinite loop by accident in an event handler, it makes the app crash (regardless of whether you use nuxt or not) but it doesn't give you a clear error message so it can be really hard to debug.
Additional context
No response
Logs