Files
botfights/server/src/seed.ts
T
DorianandClaude Opus 4.6 f62323c59f refactor: structured logging across server
Create server/src/lib/logger.ts with info/warn/error methods that add
[botfights:tag] timestamps. Replace bare console.log/warn/error calls
in index.ts, seed.ts, routes/fights.ts, engine/queue.ts, engine/mock.ts.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-08 20:41:23 +00:00

17 lines
438 B
TypeScript

import '../src/db/index.js'
import { logger } from './lib/logger.js'
import { seedMockBots, seedMockFights } from './engine/mock.js'
async function main() {
// Run migration first (creates tables + adds any missing columns)
await import('./db/migrate.js')
await seedMockBots()
await seedMockFights(15)
logger.info('seed', 'seed complete!')
process.exit(0)
}
main().catch((err) => logger.error('seed', 'seed failed', err))