Node.js express framework serve static swf file
Problem
I need to Serve Static Swf using express framework generating dynamic view similar to:
app.get('/*', function(req, res){
// serve swf here
});
Thanks
Problem courtesy of: Radoslav
Solution
Is there some reason you can't just declare a static folder?
app.use(express.static(__dirname + '/public'));
If you don't want to use the Express static folder, then you can just read the file off of the file system and serve it directly.
res.sendfile('path/to/my.swf');
Solution courtesy of: Timothy Strimple
Discussion
View additional discussion.