npm

npm’s 2019 JavaScript ecosystem survey analysis is now available!Get your copy here »

socket-file

3.0.2 • Public • Published

Socket-file License NPM version Dependency Status Build Status

File processing with help of socket.io.

Install

npm i socket-file --save

How to use?

const socketFile = require('socket-file');
 
const http = require('http');
const express = require('express');
const io = require('socket.io');
 
const app = express();
const server = http.createServer(app);
const socket = io.listen(server);
 
server.listen(port, ip);
 
socketFile(socket, {
    prefix: 'edward',
    root: '/',      /* string or function       */
    size: '512000', /* max file size for patch  */
    auth: (accept, reject) => (username, password) {
        accept();
    }
});

License

MIT

Keywords

install

npm i socket-file

Downloadsweekly downloads

441

version

3.0.2

license

MIT

homepage

github.com

repository

Gitgithub

last publish

collaborators

  • avatar
Report a vulnerability