node-static icon indicating copy to clipboard operation
node-static copied to clipboard

Usage with Express 4

Open IngwiePhoenix opened this issue 10 years ago • 2 comments

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

IngwiePhoenix avatar Jun 27 '15 21:06 IngwiePhoenix

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/

ripper2hl avatar Oct 30 '15 22:10 ripper2hl

I also want to use node-static with Express, any suggestion?

xjmalm avatar Dec 29 '15 10:12 xjmalm