Category "nestjs"

What data is needed to connect Elasticsearch module to Nestjs?

I have a problem that when running a project on nestjs and elastic an error is displayed nestjs_api_dev | ConfigurationError: Missing node(s) option nestjs_api

TypeORM SUM Operator on Relation's field

I am a student trying to develop a music library just to try out new technologies. Currently I use NestJS together with TypeORM as my backend technologies (as w

How to use moment in nestjs application

I want to use momentjs in a nestjs app, and also be able to test my services. So I provided momentjs as below in my module providers: [ { provide: '

Nest.js is giving cors error even when cors is enabled

I am developing a next.js application with nest.js as the backend. Now, I am having cors error even when I have cors enabled in my main.ts file of nest.js. Here

how to handle errors in exception filters with Fastify NestJs?

Im using the following code to catch error in fastify, however my error is that "response.send" is not a function: What's the right way to send the error on my

TypeORM Entity in NESTJS - Cannot use import statement outside a module

Started new project with 'nest new' command. Works fine until I add entity file to it. Got following error: import { Entity, Column, PrimaryGeneratedColumn

Optimise multiple api requests with Promise.all()

I'm trying to optimise multiple made to an 3rd party API (Spotify) in my NestJS API. My code is working but I do not find a way to optimise it. @Get('') async

NestJS app build with docker can't access postgres database in the same docker network: ECONNREFUSED 127.0.0.1:5432

I want to run my app on my local machine within Docker. I don't want to optimize the size of my docker app or build it for production now. Docker builds my back

nx dep-graph not showing any relations

I have this Angular/NestJS monorepo powered by NX, and I decided to make better use of NX by organising more stuff into libs, but before I do so, I want to make

How to transfer a filter to a query (TypeORM)

I want to get rid of the filter and put it in the request body. I tried using where, how can I do it? Questionnaire entity like: @OneToMany(() => LikeEntity,

How to save line breaks in database

I'm using typeorm to management my databse with nestjs framework on server and vuejs on client side, in settings i must provide a large text and i must to save

Is there a way to hide all the end-point in the controller.ts using a single decorator?

Currently, I am using @ApiExcludeEndpoint() ### on top of all methods to hide the end-point in the swagger-ui, like this: import { Controller, Get, Query,

NestJS and Mongoose find by reference object Id

I have a Mongo collection of Users and a collection of Addresses. Each address is owned by one user.Here are my schema classes: export type UserDocument = User

How to fix: No changes in database schema were found - cannot generate a migration?

I searched a lot and there are several questions like this however most of them do not have any answer or are not relevant to me. I'm using TypeORM(v0.2.45) wit

@IsPhoneNumber() npm class validator how to add multiple countries code

In Nest js dto I want to validate user mobile number with multiple countries Regex. How can I do this? @IsPhoneNumber('IN', { message: (args: ValidationArg

Validation does not work with Partial<DTO> - NestJS

I want to apply server-side validation on my CRUD API. The entity in question is called Employee. I am using an employee.dto (shown below) for the create and up

How to automatically update virtual model property when updating its foreign key reference?

I have a order table that refers to status table by foreign key status_id: $ select order_id, status_id from "order"; order_id | status_id ----------+-------

Validation does not work with Partial<DTO> - NestJS

I want to apply server-side validation on my CRUD API. The entity in question is called Employee. I am using an employee.dto (shown below) for the create and up

How to automatically update virtual model property when updating its foreign key reference?

I have a order table that refers to status table by foreign key status_id: $ select order_id, status_id from "order"; order_id | status_id ----------+-------

Typeorm How Can I get Min field with Where clause?

I use Typeorm and nestjs in my project. I have Schema: export class GroupEntity implements IGroup { // Attributes @PrimaryGeneratedColumn({ type: 'string' }