Socket
Socket
Sign inDemoInstall

simple_video_response

Package Overview
Dependencies
0
Maintainers
1
Versions
3
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

    simple_video_response

video response


Version published
Weekly downloads
0
decreased by-100%
Maintainers
1
Created
Weekly downloads
 

Readme

Source

simple_video_response

node video response

express

var express = require('express');
var app = express();
app.use(require('simple_video_response').express());
app.get('/', (req, res, next) => {
    res.video(__dirname + '/example.mp4');
});

app.listen(3000);

koa

var Koa = require('koa');
var app = new Koa();
app.use(require('simple_video_response').koa());
app.use(ctx => {
    return ctx.video(__dirname + '/example.mp4');
});

app.listen(3000);

fastify

var fastify = require('fastify')();
fastify.register(require('simple_video_response').fastify());
fastify.get('/', (request, reply) => {
    reply.video(__dirname + '/example.mp4');
});
fastify.listen(3000);

option

require('simple_video_response').express({
    basePath: "", // path to read file dir ( path.join(bathPath, "example.mp4") )
    fileStatCache: true, // caches file info (fs.stats)
    maxChunkSize: 1234567, // maximum sent chunk at one request
})

Keywords

FAQs

Last updated on 21 Sep 2021

Did you know?

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc