1.2.1 • Published 6 years ago

video-stream v1.2.1

Weekly downloads
3
License
MIT
Repository
github
Last release
6 years ago

video-stream

Express middleware for streaming video.

Installation

npm install -S video-stream

Usage

Call videoStream middleware passing the directory that we should look for videos.

const path = require('path')
const express = require('express')
const videoStream = require('video-stream')

const app = express()

// video-stream route
app.get('/video/:filename', videoStream({ dir: path.resolve(__dirname) }))

// Your normal routes
app.get('/', (req, res) => {
  res.send('Hello World')
  res.end()
})

app.listen(3000, () => {
  console.log(`Listening on port 3000`)
})

Check a working example on example folder.


caiogondim.com  ·  GitHub @caiogondim  ·  Twitter @caio_gondim

1.2.1

6 years ago

1.2.0

6 years ago

1.1.2

7 years ago

1.1.1

7 years ago

1.0.0

7 years ago