chore: change seed script to use compiled JS instead of ts-node
- Update package.json to run node scripts/seed.js instead of ts-node scripts/seed.ts - Rewrite seed.js to use compiled model from dist/ directory and Sequelize directly - Add proper error handling and database connection setup - Ensure script works after build, requiring npm run build first
This commit is contained in:
@@ -7,7 +7,7 @@
|
||||
"build": "tsc",
|
||||
"start": "node dist/main.js",
|
||||
"start:dev": "nodemon --watch 'src/**/*.ts' --exec \"ts-node\" src/main.ts",
|
||||
"seed": "ts-node scripts/seed.ts"
|
||||
"seed": "node scripts/seed.js"
|
||||
},
|
||||
"dependencies": {
|
||||
"@nestjs/common": "^11.1.12",
|
||||
@@ -45,4 +45,4 @@
|
||||
"ts-node": "^10.9.2",
|
||||
"typescript": "^5.9.3"
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user