node-static
node-static copied to clipboard
Usage with Express 4
I would like to use this module with the Express 4 server framework.
When I look at the usage examples, then it is often mentioned to attach to req's "end" event... why is that so? Otherwise, I would think that this would work:
app.use("/cdn", function(req,res,next){
fileServer.serve(req,res,function(err, result) {
res.send(err.status, err.headers);
}):
});
Will this work? o.o
any ideas from this ? , i need send video files with streaming for send to chromecast and i want server directory from absolute path, example /home/user/videos/
I also want to use node-static with Express, any suggestion?