Sign Up for Free

RunKit +

Try any Node.js package right in your browser

This is a playground to test code. It runs a full Node.js environment and already has all of npm’s 400,000 packages pre-installed, including avris-sync with all npm packages installed. Try it out:

var avrisSync = require("avris-sync")

This service is provided by RunKit and is not affiliated with npm, Inc or the package authors.

avris-sync v0.0.1

A simple file synchronisation tool using avris-fs

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

Metadata

RunKit is a free, in-browser JavaScript dev environment for prototyping Node.js code, with every npm package installed. Sign up to share your code.
Sign Up for Free