Being completely new in the environment and philosophy of node.js, I would like to get answers to a few questions. I downloaded node.js for windows installer as well as node package manager. Currently, the Windows Cmd command is used to run nodejs applications.
cls clears the command window or errors on the command line. Is there an equivalent for node.js? console.clear does not exist (or does it in some other form?
I created a server through this code below
var http = require("http"); http.createServer(function (request, response) { response.writeHead(200, { "Content-Type": "text/html" }); response.write("Hello World"); console.log("welcome world")response.end(); }).listen(9000, "127.0.0.1");
I changed the code below and updated the browser to find out that the content type is not changing, how can I see the changes?
var http = require("http"); http.createServer(function(request, response) { response.writeHead(200, {"Content-Type": "text/plain"}); response.write("Hello World"); console.log("welcome world") response.end(); }).listen(9000,"127.0.0.1");
Deeptechtons Jan 25 '12 at 17:15 2012-01-25 17:15
source share