nodejs is built upon javascript, but some methods like alert(), writeln(),... etc are not working in nodejs.
var http = require('http');
http.createServer(function (request, response) {
response.writeHead(200, {'Content-Type': 'text/plain'});
response.end(''+alert('server running')+''); // alert() not working here.
}).listen(8124);
console.log('Server running at http://127.0.0.1:8124/');
How can I use these methods in nodejs programs.
alertis part of thewindowobject found in browsers. useconsole.logto log to the terminal