Skip to content

Experimental library to sync two appwrite instances

License

Notifications You must be signed in to change notification settings

gepd/appwrite-sync

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

16 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Appwrite Sync

🚧 This is an experimental project, backup your data before use it

This is a small, and currently exprimental project, to sync two appwrite instances.

Note: this is a comunity project and isn't maintained by appwrite

How to use it

  1. Clone this repository

  2. run yarn install

  3. To make it work you need to initialize the AppwriteSync class like this

// index.ts
const app = new AppwriteSync({
  source: {
    endpoint: "",
    project: "",
    key: "",
  },
  target: {
    endpoint: "",
    project: "",
    key: "",
  },
});

After this you can sync the two instances with the sync method.

// index.ts
app.sync({
  syncDatabases: true,
  syncCollections: true,
  syncAttributes: true,
  syncIndexes: true,
  syncDocuments: true,
});

You can change each option to false to start to sync.

  1. finally run node ./dist/index.js

Development

if you update any typescipt file re-compile the code with the tsc command (you need to install typescript), after this run node ./dist/index.js again

License

This repository is available under the MIT License.

About

Experimental library to sync two appwrite instances

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published