Questions tagged [nestjs-config]
196 questions
0
votes
1 answer
NestJS - gRPC Client E2E Test
I am trying to write an e2e test for my NestJS microservice that has a gRPC client. No matter what I do to try and mock the ClientsModule in the e2e test it still seems to not pick up the config and is unable to locate the *.proto file.
Please find…

mh377
- 1,656
- 5
- 22
- 41
0
votes
1 answer
How to compare password when using bcrypt nest js log in api in mysql
How I can compare password when signin in using bcrypt,I am facing problem at the time of signin for comparing password.From that select query i can get the matched mailid but how to get hash password?????????????????
note:I am not using…

demi
- 37
- 3
0
votes
1 answer
ERROR [PackageLoader] No driver (HTTP) has been selected. In order to take advantage of the default driver
I was following a tutorial on Udemy Execution using npx ts-node-dev src/main.ts I get the error [PackageLoader] No driver (HTTP) has been selected. In order to take advantage of the default driver, please, ensure to install the…

kumail abbas
- 1
- 1
0
votes
1 answer
NestJS - Interceptor to log incoming/outgoing kafka events
I have implemented an interceptor in my NestJS application to log http request/responses using axios interceptors
https://github.com/axios/axios#interceptors
Is there something similar that I could use to log incoming/outgoing kafka events in my…

mh377
- 1,656
- 5
- 22
- 41
0
votes
0 answers
NestJS - Pass microservice to module
I'm trying to get my microservice in one of my module
Microservice:
import { ServerKafka } from "@nestjs/microservices";
import { Admin } from "@nestjs/microservices/external/kafka.interface";
export class KafkaCustomTransport extends ServerKafka…

user17714968
- 25
- 5
0
votes
0 answers
Save NestJS local project settings without committing to Github
I have created two (2) NestJS projects using Visual Studio Code, that are 99.9% identical, on 2 distinct host machines. Each project relies upon a docker-compose.yaml file and a separate .env file to connect to a Postgres database. The issue is that…
0
votes
0 answers
How can I create a NestJS graphql server with dynamic schema with respect to user?
I am using Nest JS for server and new to Graphql, I want to create a graphql server but schema defines in Graphql module in app.module. I am using schema first appraoch.
app.module
in importing Graphql Module, typepaths property defines to create…

Syed Muqeet Aqib
- 1
- 1
0
votes
1 answer
Getting error when replace HttpService from @nestjs/common to @nestjs/axios
Getting error when switched HttpService from nestjs@common to nestjs/axios.
@Injectable()
export class AxiosClient implements OnModuleInit {
private interceptors: AxiosInterceptor[];
constructor(
private httpService: HttpService,
private…

Krish909
- 77
- 2
- 12
0
votes
1 answer
NestJS App won't use the .env or configService PORT. Always starts on port 3000 no matter what
I have a barebones NestJS app where all I have done is add a .env file with PORT=3001 as the content and then modified my main.ts according to the NestJS docs:
import { ConfigService } from '@nestjs/config';
import { NestFactory } from…

toshiomagic
- 1,335
- 1
- 12
- 39
0
votes
1 answer
NestJS: Raw SQL query execution with SQL Server too slow. Configuration problems?
APP in Nestjs that is connected to a SQL Server database. All the queries are written on the database side, so the connection between them is with simple raw SQL and the use of mssql package.
Here is the thing: when I run in SSMS, a very small query…

John G.
- 11
- 2
0
votes
2 answers
Nest JS Client Module always fallback to localhost (not respecting configuration)
I'm developing service using Nest JS,
I want to create redis client module, that has publish service, and cache service that will be used by another modules
So here is my code:
Redis client module
import { CacheModule, Module } from…

rizesky
- 424
- 6
- 13
0
votes
1 answer
Nestjs Config validation error: in test even that process.env set in code
App.module.ts:
import { Module } from '@nestjs/common';
import { AppController } from './app.controller';
import { AppService } from './app.service';
import { ConfigModule } from '@nestjs/config';
import * as Joi from 'joi';
@Module({
imports: [
…

Rami Loiferman
- 853
- 1
- 6
- 22
0
votes
1 answer
What is the actual use of the optional host parameter and optional callback in the app.listen() method in Nest JS?
In the main.ts file in Nest JS, the following bootstrap function contains the app.listen() method.
async function bootstrap() {
const app = await NestFactory.create(AppModule);
await app.listen(3000);
}
My question is what is the actual use of…

abu mo2ayad
- 17
- 2
0
votes
1 answer
How to use NestJS configurations outside managed class
I'm trying to create some custom exceptions for my application. This mostly means i'm extending the HttpException class which is pretty simple.
However, as part of the exception message, I want to pass some of the configurations for the…

roloenusa
- 761
- 1
- 10
- 19
0
votes
2 answers
NestJs with TypeORM migrations fail
I use this boilerplate app to learn NestJs GITHUB LINK. The template is amazing but there was one thing that I can't fix migrations. When I try to add a new entity or use an existing one with npm run migrate:create Init migration was…

Vladimir Petukhov
- 89
- 1
- 8