CG-Feedback-Monitor/server/scripts/teamSetup.ts
Lars d894c3c8e4 V2-Stand: UX-Dashboard, Personen v2, Starter-Paket und Dexie-Legacy entfernt.
Sichert den lokalen Entwicklungsstand nach Gitea: Nav/Dashboard, Personen-Excel/Archiv, Team-Setup, Assignment-Übergabe und C6/C7/T2.

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-09-16 14:17:25 +02:00

19 lines
618 B
TypeScript

/**
* Einmal-Setup für Team-ZIP: Starter-Struktur in die V2-Dev-DB laden.
* Usage: npm run setup
*/
import { existsSync, copyFileSync } from 'node:fs'
import { dirname, join } from 'node:path'
import { fileURLToPath } from 'node:url'
const rootPath = join(dirname(fileURLToPath(import.meta.url)), '../..')
const envPath = join(rootPath, '.env')
const examplePath = join(rootPath, '.env.example')
if (!existsSync(envPath) && existsSync(examplePath)) {
copyFileSync(examplePath, envPath)
console.log('[setup] .env aus .env.example angelegt.')
}
process.env.CONFIRM = '1'
await import('./bootstrapFromStarter')