
javascript - NestJS - How to use .env variables in main app module …
Aug 6, 2020 · Install Nestjs config module - npm i --save @nestjs/config. It relies on dotenv. Create a .env file in your root folder and add your key/value pairs e.g. …
Best practice to use config service in NestJS Module
Nov 22, 2018 · I also encountered several issues with implementing a ConfigService as described in the NestJS documentation (no type-safety, no modularity of configuration values, ...), I wrote …
Validate nested objects using class validator and nestjs
Dec 14, 2018 · I'm also using built-in nestjs validation pipe, this is my bootstrap: async function bootstrap() { const app = await NestFactory.create(ServerModule); app.useGlobalPipes(new …
NestJS - Validating body conditionally, based on one property
Jan 5, 2019 · I'm trying to find a nice way to validate a body using DTO (using the brilliant class-validator and class-transformer libraries). It works really well, even for nested structures but in …
NestJs Passport jwt unknown strategy - Stack Overflow
Feb 26, 2020 · Import your Authentication Module inside your User Module, then your user service will detect it. user.module.ts
NestJS + TypeORM: Use two or more databases? - Stack Overflow
Aug 24, 2018 · My goal was to write a NestJS app (with TypeORM included) which serves a RestAPI for 2 or 3 of my little projects, instead of writing a NestJS-App for every single one of …
NestJS: Option to make file in endpoint optional
May 13, 2023 · I am using NestJS to create REST API and I am trying to create an endpoint that will require certain body but also accept file that should be optional. …
NestJS: How to transform an array in a @Query object
Dec 11, 2019 · NestJS/Class-transformer @Type Discriminator object doesn't correctly validate data. 10. Class transformer ...
nestjs - How can I enable or disable caching in nest js ... - Stack ...
Sep 17, 2020 · As of today, I don’t think there’s a way to completely turn off caching once you start using the @cache-manager module in NestJS. However, I was able to achieve a similar …
nestjs - Dependency Injection for Nest JS Interceptor is Undefined ...
Mar 5, 2020 · I have created an interceptor as shown below that I wish to use globally. I added the interceptor to my module and set it up so that nest js should handle the DI for me per NestJS …