2020-02-20 22:50:08 -08:00
|
|
|
import Sync from '../src/sync'
|
2019-02-10 22:25:17 -08:00
|
|
|
import onDeath from 'ondeath'
|
|
|
|
|
|
|
|
(async () => {
|
2019-02-15 21:26:07 -08:00
|
|
|
const sync = new Sync({jobsDir:'./example/jobs'}) // look for job files here
|
2019-02-10 22:25:17 -08:00
|
|
|
|
2019-02-16 18:55:44 -08:00
|
|
|
await sync.runJob('remote')
|
|
|
|
// await sync.loadJob('local')
|
2020-02-20 22:50:08 -08:00
|
|
|
// sync.watch('on')
|
|
|
|
// console.log('ready and waiting')
|
2019-02-10 22:25:17 -08:00
|
|
|
|
|
|
|
onDeath( () => {
|
|
|
|
console.log('\nHe\'s dead Jim')
|
|
|
|
sync.watch('remove')
|
|
|
|
})
|
|
|
|
|
|
|
|
})().catch(err => {
|
|
|
|
console.error('FATAL: UNABLE TO START SYSTEM!\n',err)
|
|
|
|
})
|