Your app.js file contains mostly extraneous unused code related to the express 
framework. And then you completely ignore that and create your own server; the 
following appears to be the only code you're actually using:


var http = require('http'); //add the http module
var myServer = http.createServer(function(res, res) {
  // res.writeHead(200, {"Content-Type" : "text/html"});
  // res.write("<b>Hello</b> World");
  // res.sendFile(html/tenants.html);
   res.sendfile(__dirname + '/html/tenants.html');
  res.end();
}); //create a server

myServer.listen(3000);


One problem I see is that the signature of the function you're passing to 
http.createServer is wrong: you've specified the argument name "res" twice. The 
first parameter should be "req" (for "request"), and the second parameter 
should be "res" (for "response"):


var myServer = http.createServer(function(req, res) {


-- 
Job board: http://jobs.nodejs.org/
New group rules: 
https://gist.github.com/othiym23/9886289#file-moderation-policy-md
Old group rules: 
https://github.com/joyent/node/wiki/Mailing-List-Posting-Guidelines
--- 
You received this message because you are subscribed to the Google Groups 
"nodejs" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To post to this group, send email to [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/nodejs/F628B2BB-2852-4D0E-A68A-EDE873CDEC42%40ryandesign.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to