sync-server
Version:
A simple server which can be used to synchronize data from Dexie.Syncable and an ISyncProtocol implementation and write them into files
24 lines (17 loc) • 497 B
JavaScript
;
const path = require('path');
const argv = require('yargs').argv;
const startAction = require('../lib/actions/start');
const initAction = require('../lib/actions/init');
const action = argv._[0];
const basePath = process.cwd();
switch (action) {
case 'init': initAction(basePath); break;
case 'start': {
const dataPath = path.resolve(argv.path);
startAction(dataPath);
break;
}
default: console.log('Action', action, 'not supported');
}