I\'m new in node.js and java script, i cant find meaning of this \".on\" keyword. when i change it with another word code failed.
var req = http.get(\"http:/
The on method binds an event to a object.
It is a way to express your intent if there is something happening (data sent or error in your case) , then execute the function added as a parameter. This style of programming is called Event-driven programming. You might want to look it up in the Wikipedia
In node.js, there is a class called EventEmitter that provides you with all the code that you need for basic events if you decide to use them in your own code (which I would strongly recommend in the case of node.js). Docs for node.js EventEmitter are here