login community faq

hi all,

i 'm trying to host a webpage using node.js. But it is not showing the images on the webpage..

Please help.

Thank you.

asked Dec 01 '10 at 08:07

newborn_developer's gravatar image

newborn_developer
11


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

seanf's gravatar image

seanf ♦♦
55991220

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

Dave%20Stevens's gravatar image

Dave Stevens
8129

Your answer
If you have an answer to the above question, then use the form below. Otherwise, use the appropriate 'add new comment' button above to post your feedback.
toggle preview

Follow this question

By Email:

Once you sign in you will be able to subscribe for any updates here

By RSS:

Answers

Answers and Comments

Tags:

×21

Asked: Dec 01 '10 at 08:07

Seen: 1,931 times

Last updated: Dec 05 '10 at 14:53

Plans & prices    Sign up    Why WebFaction?    Contact us    Affiliate program    Support    Legal    Jobs    Blog    Control panel login
Powered by OSQA
© Copyright 2003-2012 Swarma Limited - WebFaction is a service of Swarma Limited