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.
JavaScript
123456789101112131415161718192021222324import { mkdirSync } from "node:fs";import { spawnSync } from "node:child_process";import { dirname } from "node:path";import { fileURLToPath } from "node:url";
const database = fileURLToPath(new URL("./data/contrail.sqlite", import.meta.url));mkdirSync(dirname(database), { recursive: true });
const args = process.argv.slice(2);if ( (args[0] === "backfill" || args[0] === "dev") && !args.includes("--sqlite") && !args.includes("--temporary")) { args.splice(1, 0, "--sqlite", database);}
const result = spawnSync("contrail", args, { cwd: dirname(fileURLToPath(import.meta.url)), stdio: "inherit",});if (result.error) throw result.error;process.exitCode = result.signal === "SIGINT" ? 0 : (result.status ?? 1);