Since Node.js has a single thread, would calling a function like alert(), which waits for a user, freeze the entire server? Or does Node.js know to prevent functions such as that?
Yes it will freeze the server. You should remember that alert() function is a property of browser window objects. alert() is not really part of JavaScript; it's just a facility available to JavaScript code in that environment. Also alert() function is not available in node.js
Yes, it would freeze the server, for the reason you described. That's the reason alert doesn't exist in NodeJS.
alert is a property of the window object anyway, which only browsers provide.