var sys = require(“sys”);
sys.puts(“Hello world”);
node hello.js
The “sys” module is now called “util“. It should have a similar interface.
Hello world
change to ->
var sys = require(“util”);
sys.puts(“Hello world”);
node hello.js
Hello world
=============
Another demo for ‘Hello World!”.
demo.js
var sys = require("util"),
http = require("http");
http.createServer(function(request, response) {
response.setHeader("200", {"Content-Type": "text/html"});
response.write("Hello World!");
response.end();
}).listen(8080);
sys.puts("Server running at http://localhost:8080/");