fix some bug

This commit is contained in:
2026-09-10 18:34:31 +03:30
parent 24c24e03fb
commit a308d6e039
7 changed files with 60 additions and 24 deletions
+4 -2
View File
@@ -9,7 +9,9 @@ import { runBundledSeed } from './run-seed';
async function bootstrap() {
if (process.env.NODE_ENV === 'production') {
await applyPendingMigrations();
await runBundledSeed();
if (process.env.RUN_SEED === 'true' || process.env.RUN_SEED === 'force') {
await runBundledSeed();
}
}
const app = await NestFactory.create(AppModule);
@@ -20,7 +22,7 @@ async function bootstrap() {
app.use(urlencoded({ extended: true, limit: bodyLimit }));
// پشت LiteSpeed روی /server → GLOBAL_PREFIX=server/api
const globalPrefix = process.env.GLOBAL_PREFIX || 'api';
const globalPrefix = process.env.GLOBAL_PREFIX || 'server/api';
app.setGlobalPrefix(globalPrefix);
app.enableCors({
origin: true,