Wednesday, 26 April 2017

Serve static mp4 video with express

I made a simple node express server serving statically a public directory

app.use('/public', express.static(path.join(__dirname, 'public')))

the public folder contains a mp4 video.

It works great when I try to access the file with chrome on windows but with chrome on ubuntu I can't play the video and I get either no error message or net::ERR_TIME_OUT or ERR_CONTENT_LENGTH_MISMATCH, it is totally random.

The node server is running on a VPS with ubuntu and I don't use any reverse proxy for now.



via Gatoyu

No comments:

Post a Comment