socket-file

7.0.0 • Public • Published

Socket-file License NPM version 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',
    // string or function
    root: '/',
    // max file size for patch
    size: '512000',
    auth: (accept, reject) => (username, password) => {
        accept();
    },
});

License

MIT

Readme

Keywords

Package Sidebar

Install

npm i socket-file

Weekly Downloads

213

Version

7.0.0

License

MIT

Unpacked Size

9.79 kB

Total Files

5

Last publish

Collaborators

  • coderaiser