I'm very new to node.js so I apologize if this is a poor question. I have a simple HTTP server here:
var http = require('http');
http.createServer(function (request, response){
response.writeHead(200, {"Content-Type":"text/html"});
// response.write("<html><head><script type = 'text/javascript'>alert('hello');</script></head></html>");
response.write("<html><head><script type = 'text/javascript' src = 'alerter.js'></script></head></html>");
response.end();
}).listen(8000);
console.log("Server has started.");
alerter.js contains the one line:
alert("hello");
Why does using the commented-out line properly cause an alert, but calling alerter.js does nothing?