main
Some checks failed
Backend Deploy 🚀 / build-and-deploy (push) Has been cancelled

This commit is contained in:
Harun CAN
2026-03-09 02:17:10 +03:00
parent 6221137a35
commit 1a6b00478f
28 changed files with 999 additions and 43 deletions

View File

@@ -12,6 +12,7 @@ import {
QueryResolver,
} from 'nestjs-i18n';
import * as path from 'path';
import { ServeStaticModule } from '@nestjs/serve-static';
// Config
import {
@@ -39,6 +40,7 @@ import { UsersModule } from './modules/users/users.module';
import { AdminModule } from './modules/admin/admin.module';
import { HealthModule } from './modules/health/health.module';
import { GeminiModule } from './modules/gemini/gemini.module';
import { CmsModule } from './modules/cms/cms.module';
// Guards
import {
@@ -75,11 +77,11 @@ import {
level: configService.get('app.isDevelopment') ? 'debug' : 'info',
transport: configService.get('app.isDevelopment')
? {
target: 'pino-pretty',
options: {
singleLine: true,
},
}
target: 'pino-pretty',
options: {
singleLine: true,
},
}
: undefined,
},
};
@@ -160,6 +162,15 @@ import {
// Optional Modules (controlled by env variables)
GeminiModule,
HealthModule,
// CMS Module
CmsModule,
// Serve uploaded files
ServeStaticModule.forRoot({
rootPath: path.join(__dirname, '..', 'uploads'),
serveRoot: '/uploads',
}),
],
providers: [
// Global Exception Filter
@@ -199,4 +210,4 @@ import {
},
],
})
export class AppModule {}
export class AppModule { }