i 'm trying to host a webpage using node.js. But it is not showing the images on the webpage..
asked Dec 01 '10 at 08:07
We recommend that you configure your node app to serve images and other static media on a URL path like /static. You can then create a separate static-only app in our control panel, copy your media to that app's directory, and add that app to your site on URL path /static.
answered Dec 01 '10 at 16:33
If you're looking to serve everything out of node, you have to remember that you are responsible for catching the request and seeing what to do with it. If you're serving an image, first you have to determine which MIME type it is, send that header to the response, then serve the file. Remember that the physical directory structure doesn't have the same impact it does in an Apache served site, for instance.
If you could post up the node.js script you're using to run the server, I'd be happy to offer some suggestions as to how to get it working.
answered Dec 05 '10 at 14:53