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

1.0.25 • Public • Published

Intro

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

A tool to sync directories on a remote server

Install

use in project

npm install --save git+https://github.com/anzerr/sync.folder.git
npm install --save @anzerr/sync.folder

add command

git clone git+https://git@github.com/anzerr/sync.folder.git &&
cd sync.folder &&
npm link

docker

docker run --restart always --name sync -v $(pwd):/cwd -p 3000:3000 -p 3001:3001 -u `id -u $USER` anzerr/sync.folder
syncF client --host 192.168.99.100:3000 --cwd .

Example

syncF server --host 0.0.0.0:3000 --cwd ./tmp
syncF client --host localhost:3000 --cwd ./src

syncF client --save --name "sync.json" --host 127.0.0.1:3000 --cwd ./server
syncF client --save --name "sync.json" --host 127.0.0.1:3001 --cwd ./client
syncF client --load --name "sync.json"
const sync = require('sync.folder');

let port = 5935;
new sync.Server('./tmp', 'localhost:' + port);
let client = new sync.Client('./src', 'localhost:' + port);

client.on('remove', (r) => {
	console.log('removed', r);
});

client.on('add', (r) => {
	console.log('add', r);
});

Package Sidebar

Install

npm i @anzerr/sync.folder

Weekly Downloads

15

Version

1.0.25

License

MIT

Unpacked Size

16.6 kB

Total Files

13

Last publish

Collaborators

  • anzerr