Skip to content

Repository files navigation

socket.io-sync is a tool collection which help you push files to any places you may want them be by network and socket.io

Server npmdependencies Status

First of all, you should put siosync-server to where all siosync-push and siosync-pull can access. At the server where siosync-server placed in, run:

npm install --g siosync-server

Create a config file siosync.js

module.exports={host: '127.0.0.1',port: 12345// any port you can use}

Run it and keep it always running:

siosync-server

Check siosync-server --help for more detail

Pull npmdependencies Status

Secondly, put siosync-pull to where you want files to be received. To be precise, siosync-pull is the end that pull files from siosync-server which actually from siosync-push:

npm install -g siosync-pull

And create a config file siosync.js:

module.exports={socketHost : '127.0.0.1',// server hostsocketPort : 12345,// server portsocketPath : '/socket.io',// optional, default is 「/socket.io」room : 'abc',// any string but must match siosync-pushworkplacePath: '/home/user/mywork/'// put files to wherechmod : 0o777,// optional, chmod of file/dir, default is 777}

Run it:

siosync-pull

Check siosync-pull --help for more detail

Proxy is not supported

Push npmdependencies Status

Thirdly, put siosync-push to where you want files to be sent to other places:

npm install -g siosync-push

Create a config file siosync.js:

module.exports={socketHost: '127.0.0.1',// server hostsocketPort: 12345,// server portsocketPath: '/socket.io',// optional, default is 「/socket.io」room: 'abc',// any string but must match siosync-pullpaths: ['push/'],// files/dirs to push, chokidar glob patternsworkplacePath: '/home/project'// optional, workplace dir, default is cwdignored: []// optional}

Run it:

siosync-push
siosync-push --watch
siosync-push --watch --ignoreInitial

Check siosync-push --help for more detail

Proxy is supported

About

Sync files between machines by socket.io

Resources

Stars

4 stars

Watchers

1 watching

Forks

Releases

Packages

Used by

Contributors

Languages