Initial import of Forge app

This commit is contained in:
2026-08-29 12:30:19 +03:00
commit e637634c59
118 changed files with 17355 additions and 0 deletions
+17
View File
@@ -0,0 +1,17 @@
import 'dotenv/config';
import { pool, initDB, reseedFromArchives } from './db';
// CLI: reload the tickets table from server/data/*.json, replacing whatever is
// there. Use after regenerating the archives (e.g. from a Let it Snow storage
// dump via scripts/dump-to-archives.mjs). Destructive: TRUNCATEs tickets first.
// npx tsx server/reseed.ts (or: npm run reseed)
(async () => {
if (!process.env.DATABASE_URL) {
console.error('DATABASE_URL is required');
process.exit(1);
}
await initDB();
const n = await reseedFromArchives();
console.log(`Reseeded ${n} tickets from server/data archives`);
await pool.end();
})();