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>
17 lines
438 B
TypeScript
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))
|