Package Exports
- socket-file
- socket-file/lib/socket-file.js
This package does not declare an exports field, so the exports above have been automatically detected and optimized by JSPM instead. If any package subpath is missing, it is recommended to post an issue to the original package (socket-file) to support the "exports" field. If that is not possible, create a JSPM override to customize the exports field for this package.
Readme
Socket-file

File processing with help of socket.io.
Install
npm i socket-file --saveHow 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