Global options defined in main.ts of a brand new NestJS project (inside Nrwl NX) don't seem to be taking affect. Perhaps this is because of Nrwl NX somehow?
My nestjs main.ts file looks like so
// NestJSX Global Crud Config must be BEFORE you import AppModule
import { CrudConfigService } from '@nestjsx/crud';
CrudConfigService.load({
query: {
limit: 2,
},
});
import { NestFactory } from '@nestjs/core';
import { AppModule } from './app/app.module';
import { config } from './config';
import { FusionAuthGuard } from '@sun/auth/nest/guards/fusionauth.guard';
import { SwaggerModule, DocumentBuilder } from '@nestjs/swagger';
async function bootstrap() {
// Create our nest application
const app = await NestFactory.create(AppModule);
etc...
+1
@mreschke could you please confirm that you're using this feature as an example here https://github.com/nestjsx/crud/commit/2a6465f353da6f24d16f2e55aa281fb73a354f45 ?
Yes. Talking about your docs here https://github.com/nestjsx/crud/wiki/Controllers#global-options adding CrudConfigService.load BEFORE the import of main AppModule in the main.ts of a Nrwl Nest project. Just trying to get global configs to take affect and they don't seem to be. Maybe there is a different better place to attempt global options in Nrwl NestJS project?
I'm having the same issue, it seems that the decorators are running before the load happens.
@mreschke Did you find a way to solve this?
Edit:
I moved the load to my CoreModule thats being imported to the AppModule.
I'm having the same issue as well.
+1
Most helpful comment
I'm having the same issue as well.