*You haven't mentioned CSS before, and you haven't shown us the HTML 
content, so it's a little hard to know what's going on. However, I should 
point out that you are responding to *every* request to your server with 
the contents of the HTML file. So if your CSS URL is also pointing to the 
same server, it's going to retrieve HTML content and not CSS content. That 
would not be good! You would need to look at the request, in your server, 
to determine what you should be sending back. Again, the tutorials should 
help you understand this better.*
*
*
* *Sorry, i'm doing a mcv app in node, i have a layout, so all i do is to 
put the content in this layout, so, if the url is "test", this call 
"test_controller", that render "layou/layout" and call "layout_controller" 
where is send to a function "layout" the object from "test_controller", see:

LayoutController.layout = function(obj) 
{
var http = require('http'),
fs = require('fs');
 var html = fs.readFileSync('./app/views/'+ obj.__action+'/'+obj.fileName);
http.createServer(function(request, response) {  
response.writeHeader(200, {"Content-Type": "text/html"});  
response.write(html);  
response.end();  
}).listen();
 obj.content = html;
obj.render('layout/layout');
}

 As can be seen, this function read in on single place every different obj 
that comes here, but, as you can see, the layout is all the page with css 
and javascript, it's always static, only the content changes. So, as you 
can see again, the listen obj is empty, and it's works perfectly, but when 
i put some port happens what i said before.

-- 
Job Board: http://jobs.nodejs.org/
Posting guidelines: 
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 post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/nodejs?hl=en?hl=en

Reply via email to