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);
});
A photo of me

About the author

Hi! I'm Andrea (they/them). I tell computers what to do, both for a living and for fun, I'm also into blogging, writing and photography. I'm trying to make the world just a little bit better: more inclusive, more rational and more just.