sync

Tarant Sync Client

Motivation Provide the capabilities to actors to synchronize with a backend. Installation add it to your project using npm install tarant-sync-client --save or yarn add tarant-sync-client Usage Initialize the sync client with the configuration you desire and add it to your actor system as both a materializxer and a resolver import { RemoteResolverMaterializer } from "tarant-sync-client"; import AppActor from '../AppActor'; const config : any = { sync: { active: true, delay: 1000 }, paths: { pull: "/pull", push: "/push", }, actorTypes: { AppActor } } const remote = new RemoteResolverMaterializer(config) const system = ActorSystem.

Tarant Sync Router Express

Motivation remote-sync server for bindings clients using routers or tarant-sync-router-express Installation add it to your project using npm install tarant-sync-router-express --save or yarn add tarant-sync-router-express Usage initialize your controllers/routers by calling the SyncController with the actor system and the wanted configuration. Adding them to your express app. import SyncController from "tarant-sync-router-express" import { ActorSystem, ActorSystemConfigurationBuilder } from 'tarant' import AppActor from '../AppActor' const app: express.Application = express() const port: number = 3002 const config : any = { paths: { pull: "/pull", push: "/push", }, actorTypes: { AppActor } } const system : any = ActorSystem.