Your http server is currently hard-coded to serve the
"callhttpservice.html" file, regardless of what url was actually requested.
You should be looking into using a web framework like express (and the
"static()" middleware) to serve static files properly for you.

On Thu, Mar 22, 2012 at 9:50 AM, s j <[email protected]> wrote:

> Hello,
>
> When i embed a swf file on an html file, and try to serve it through node
> js server, the swf file doesn't appear.  how can i fix this?
>
> (*the callhttpservice.html file has the swf embedded on it, attached is
> the html page)*
>
> var fs = require('fs');
> var server = require('http').createServer(function(req, response){
>     fs.readFile(__dirname + '/callhttpservice.html', function (err, data) {
>     response.writeHead(200, {'Content-Type':'text/html'});
>     response.write(data);
>     response.end();
>   });
> });
> server.listen(8080);
>
>
> thanks for your help
>
> --
> 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
>

-- 
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