I am learning Node now, and I am a little perplexed regarding the virtual server component of it. What I would like to understand is, where does Node reside when it's serving web pages?
For example learning it now, I of course have Node downloaded on my machine locally. And I am learning about how to create the virtual server via code like the following:
var http = require("http");
http.createServer(function(request, response) {
response.writeHead(200, {"Content-Type": "text/plain"});
response.write("Hello World");
response.end();
}).listen(8888);
When it's time to take whatever I end up developing in Node live to the web, do I download Node to the server that is hosting my site? And then I guess if I do that, is the following going to take place:
"Node.js contains a built-in asynchronous I/O library for file, socket, and HTTP communication, which allows applications to act as a web server without software such as Apache or IIS." WikiPedia Article on Node
So I guess,...the files, that will be my application, once living in the server hosting my site, with Node.js installed, will act as a web server without software such as Apache or IIS?
So I am confused about this server creation process and where Node.js lives when it serves web pages.
Regarding the code, that I understand. That's just JavaScript.
I'd appreciate the clarification. Thanks, Chris Mazzochi