feat: add admin js
This commit is contained in:
@@ -6,6 +6,7 @@ import { ResponseInterceptor } from './common/interceptors/response.interceptor'
|
||||
import helmet from 'helmet';
|
||||
import { ConfigService } from '@nestjs/config';
|
||||
import { Logger } from 'nestjs-pino';
|
||||
import { AdminPanelSetup } from './modules/admin-panel/admin-panel.setup';
|
||||
|
||||
async function bootstrap() {
|
||||
const app = await NestFactory.create(AppModule, { bufferLogs: true });
|
||||
@@ -14,6 +15,10 @@ async function bootstrap() {
|
||||
|
||||
app.setGlobalPrefix('v1');
|
||||
|
||||
// Mount the admin panel before Nest registers its body parsers; the setup
|
||||
// itself is deferred until the DI container is ready (after app.init)
|
||||
AdminPanelSetup.mount(app);
|
||||
|
||||
app.useGlobalPipes(
|
||||
new I18nValidationPipe({
|
||||
whitelist: true,
|
||||
@@ -94,6 +99,10 @@ async function bootstrap() {
|
||||
|
||||
SwaggerModule.setup('v1/docs', app, document);
|
||||
|
||||
await app.init();
|
||||
|
||||
AdminPanelSetup.setup(app);
|
||||
|
||||
await app.listen(process.env.PORT ?? 3000);
|
||||
}
|
||||
bootstrap();
|
||||
|
||||
Reference in New Issue
Block a user