node js in windows cannot run a Hello World program in js

I am quite new to Node.js and i am facing problem in running a simple 'hello world' program in Node.js

program1:

console.log("hello world");

program2:

var http = require('http');

http.createServer(function (request, response) {
    response.writeHead(200, {'Content-Type': 'text/plain'});
    response.end('Hello World\n');
}).listen(8124);

console.log('Server running at http://127.0.0.1:8124/');

After running both the programs,this is how the terminal continues looks:

>node hello.js
...

You have written the following command in the node js command prompt

node hello.js

You are getting dots (....) in the terminal because you are not giving the complete path of the hello.js file.

try this, For Example assume that the path of your hello.js file is C:\files\hello.js

so,

node C:\files\hello.js

This will display proper "Hello world" message for your Program 1. This may resolve your issue.

Regards