node-http-streamer
v1.0.5
Published
A Node.js implementation of HTTP-Streaming for serving static Media-Content as an Express Middleware
Downloads
12
Maintainers
Readme
Node HTTP Streamer
HTTP-Streaming for Node.js
A simple lightweight Express-Middleware that serves static content by Streaming
Set Up
Installation
$ npm install node-http-streamer
Import
const streamer = require("node-http-streamer");
Sample
Just provide a path to a directory with media files for streaming(Video, Audio, etc).
const express = require("express");
const path = require("path");
const streamer = require("node-http-streamer");
const app = express();
// Stream all contents of directory "video" at path "/stream"
app.use("/stream", streamer(path.join(__dirname, "video")));
Links
Github: https://github.com/GregoryPevnev/node-streamer NPM: https://www.npmjs.com/package/node-http-streamer