Fix database seeding: include carOptions.json in server dir

The seed data file was referenced from Kenteken-Gen-1-main/ which
is not copied into the Docker image. Moved carOptions.json to
server/ so it's available in the container. Also added .gitignore
and removed node_modules and db files from tracking.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
Ubuntu
2026-03-02 11:01:40 +00:00
parent 2aa2a95475
commit 80809c6775
1387 changed files with 507 additions and 442520 deletions

View File

@@ -49,18 +49,12 @@ export function initDb() {
}
function seedDefaultCars() {
const defaultCarsPath = join(__dirname, '..', 'Kenteken-Gen-1-main', 'src', 'frontend', 'carOptions.json');
const defaultCarsPath = join(__dirname, 'carOptions.json');
let defaultCars;
try {
defaultCars = JSON.parse(readFileSync(defaultCarsPath, 'utf-8'));
} catch {
// Fallback: try from shared-cars.json
try {
const sharedPath = join(__dirname, '..', 'Kenteken-Gen-1-main', 'shared-cars.json');
defaultCars = JSON.parse(readFileSync(sharedPath, 'utf-8'));
} catch {
defaultCars = [];
}
defaultCars = [];
}
const insert = db.prepare(