Cannot find module 'C:\server.js'

I got the following error.I searched and tried something but I couldn't fix the problem.

C:\>node server.js

module.js:340
throw err;
      ^
Error: Cannot find module 'C:\server.js'
at Function.Module._resolveFilename (module.js:338:15)
at Function.Module._load (module.js:280:25)
at Function.Module.runMain (module.js:497:10)
at startup (node.js:119:16)
at node.js:901:3

My server.js

var http = require('http');
http.createServer(function (req, res) {
res.writeHead(200, {'Content-Type': 'text/plain'});
res.end('Hello World\n');
}).listen(1337, '127.0.0.1');
console.log('Server running at http://127.0.0.1:1337/');

How can I run server.js with node.I have already installed node.js and also typed from command prompt npm install socket.io. Everything seems Ok. Please help.

You probably didn't save the server.js file in C:. Use cd <dir> to get into the correct directory, then try that node command again.