fix some bug
This commit is contained in:
+4
-2
@@ -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,
|
||||
|
||||
Reference in New Issue
Block a user