title: How To Set Default Home Page in Node.Js?
body: <p>Here Is My Code I am Able To See this File Content but on refresh, not as soon i type localhost and port.</p>
  
  <pre><code>// Include http module,
  var http = require("http"),
  // And url module, which is very helpful in parsing request parameters.
      url = require("url");
   var EventEmitter = require('events').EventEmitter;
   var fs = require('fs');
   var emitter = new EventEmitter;
  var fdata="";
  http.createServer(function (request, response) {
  
  if(request.url=="/")
  {
          response.writeHead(200, {'Content-Type': 'text/html'});
        fs.readFile("xhtmlJs.xhtml","UTF-8" ,function (err, data){
             fdata=data;       
      });
      response.write(fdata+"&lt;br/&gt;"+request.url);
       response.end();
   }
  }).listen(1234);
  </code></pre>