socket-file
v8.0.1
Published
file processing with help of socket.io
Readme
Socket-file

File processing with help of socket.io.
Install
npm i socket-file --saveHow to use?
import http from 'node:http';
import {socketFile} from 'socket-file';
import express from 'express';
import {Server} from 'socket.io';
const app = express();
const server = http.createServer(app);
const socket = new Server(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
