sync-bin

0.0.2 • Public • Published

sync-bin

NodeJS file directory synchronization via http. Done with express and request modules.

Cloud Installation

Install the module on your project:

npm install sync-bin

Init a stand-alone server instance:

var sync = require('sync-bin');

sync.start(sync.init(),true);

or add it to your express app:

sync.config.host = '127.0.0.1';
sync.config.port = '8080';
sync.config.serve = 'assets';

sync.start(app);

Client requester

sync.get('files/from','files/to',function(dir){
	if (dir.error) return console.log('ERROR',dir.error);
	console.log('Synchronizing!');
});

Configuration

Customize the configuration to specify the correct routes:

{
	host: 'localhost',
	port: 8060,
	url: 'sync',
	key: 'path',
	delay: 10,
	serve: 'files'
}

Readme

Keywords

none

Package Sidebar

Install

npm i sync-bin

Weekly Downloads

0

Version

0.0.2

License

none

Last publish

Collaborators

  • albertvp