@anzerr/file.stream
TypeScript icon, indicating that this package has built-in type declarations

1.0.17 • Public • Published

Intro

GitHub Actions status | linter GitHub Actions status | publish GitHub Actions status | test

A client and server to handle streaming files with pipes and remove them from a remote server

Install

npm install --save git+https://github.com/anzerr/file.stream.git
npm install --save @anzerr/file.stream

Example

const sync = require('file.stream');

let port = 5936;
new sync.Server(process.cwd(), 'localhost:' + port);
let client = new sync.Client('localhost:' + port);
fs.createReadStream('./example.js')
	.pipe(client.createUploadStream('example1.js'))
	.on('close', () => {
		client.remove('example1.js').then(() => {
			console.log('removed file');
		});
	});

Package Sidebar

Install

npm i @anzerr/file.stream

Weekly Downloads

0

Version

1.0.17

License

MIT

Unpacked Size

15.4 kB

Total Files

10

Last publish

Collaborators

  • anzerr