avris-sync

0.0.1 • Public • Published

Avris Sync

A simple file synchronisation tool using avris-fs.

Warning! It's a very early version! Conflict handling is not implemented, so only use it when you can safely assume often synchronisations/rare conflicts/versioning on the remote, etc.

Example

import {AvrisSync} from "avris-sync";
import {AvrisFilesystem} from "avris-fs/dist/AvrisFilesystem";
import {LocalAdapter} from "avris-fs/dist/adapter/LocalAdapter";
import {S3Adapter} from "avris-fs/dist/adapter/S3Adapter";
import {dump} from "avris-sync/dist/helpers";
import {config as dotenv} from 'dotenv';

dotenv();

const as = new AvrisSync(
    new AvrisFilesystem(
        new LocalAdapter(__dirname + '/data/'),
    ),
    new AvrisFilesystem(
        new S3Adapter(
            process.env.AWS_BUCKET,
            process.env.AWS_KEY,
            process.env.AWS_SECRET
        ),
    ),
);    

as.sync().then((res) => {
    dump(res);
});

Copyright

/avris-sync/

    Package Sidebar

    Install

    npm i avris-sync

    Homepage

    avris.it

    Weekly Downloads

    1

    Version

    0.0.1

    License

    MIT

    Unpacked Size

    20.1 kB

    Total Files

    10

    Last publish

    Collaborators

    • avris