Something went wrong. Try again.
[READ-ONLY] Mirror of https://github.com/flo-bit/contrail. atproto backend in a bottle flo-bit.dev/contrail
Something went wrong. Try again.
TypeScript
1234567891011121314151617181920212223242526272829303132import { Contrail, DatabaseBootstrapTarget, getBootstrapVerification, getStatusOverview,} from "@atmo-dev/contrail";import { config } from "./contrail.config";import { databasePath, openDatabase } from "./database";
const db = openDatabase();const contrail = new Contrail({ ...config, db });await contrail.init();
const bootstrap = await new DatabaseBootstrapTarget(db, contrail.config).load();console.log( JSON.stringify( { database: databasePath, ...(await getStatusOverview(db, contrail.config)), bootstrap: bootstrap && { phase: bootstrap.phase, captureFrom: bootstrap.captureFrom, catchupThrough: bootstrap.catchupThrough, changeCheckpoint: bootstrap.changeCheckpoint, }, verification: await getBootstrapVerification(db), }, null, 2, ),);