Dive into the sea
Node.js : You must have heard about this technology. Before you start knowing about Node.js, you need to know what is the difference between Node.js and existing traditional server-side scripting environments
(for example PHP, Ruby etc).
Asynchronous Programming
In Node.js, every function is asynchronous, that is ".... everything that would normally block the thread is instead executed in the background...". This is the most important thing you should keep in mind.
As of now, lets think of a function that writes to/read from a file system. You have to specify a callback function that is executed when the read operation has completed.
In a tutorial of net.tutsplus.com, I found this sentence "Node.js is only an environment; you have to do everything yourself". So as an end result we will get a high performance web application application.
Little Info on Modules
Node.js, uses a module architecture, which helps to simplify the creation of complex web applications. Word "Modules" can be confusing sometimes, its nothing but like libraries in C. Which contains, related functions. Take the eample of http module, its will contains functions specific to HTTP.
To include a module , use require('path to module'), which will return the reference to the module specified.
ex : var cloudServer = require('cloud');
Scope of variables/functions in a module is mostly private, so that the variables and functions in a module is accessible only inside
the module. We can use exports keyword to make it accessible outside the module.
See the sample below

Global Scope
The global scope in Node is GLOBAL (as opposed to window in the browser), its easy to create a global variable or function.Forget var keyword when you declare a function/variable, like this:
gVariable = 1000;
gFunction = function () { ... };
Global variables should be avoided whenever possible. So be careful and use var keyword when ever needed.
Same old "Hello World"
Yes, the same old "Hello World", which is everyone's first step in every programming language. If you feel it should not be "Hello World",try something new like "Hello Node" or "Hello Dear" or some "blah blah blah".
Create a file, my_first.js. Type in the code shown below,
console.log('Write what ever you need!!!');
Open the terminal/command line, navigate to the folder that contains my_first.js, and execute the following command:
node hello.js
You should see that "what ever written in the qutes" displayed in the console.
Now to Step Two
Lets do something advanced, don't worry, its simple. Look at the code, comments will give explanation.
Type the above code and save it as helloHttp.js. Type in following command to console,
node helloHttp.js
In your browser navigate to "http://localhost:8090". You will see the text "Hello HTTP!" in the page.
One more step , Three
Here is an example code which send a parameter with the request and receives a response,
Run the application through console, then go to your browser window, type in following url
http://localhost:8090/?name=Melvin. You will see the text "Welcome : Melvin" in the page.









