Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Nest.Js not accepting any changes

I tried creating a new method inside AppController but it's not reflecting changes. I even tried to change the default getHello() method but it's outputting "Hello World!". How is this possible?

Insomnia

enter image description here

AppController

enter image description here

AppService

enter image description here

like image 582
Istiyak Tailor Avatar asked Feb 05 '20 10:02

Istiyak Tailor


People also ask

Is Nest JS worth learning?

Nestjs gives a very clean structure for building web apps. It can be compared to well established frameworks like LARAVEL, DJANGO in case of functionalities. yes it may not be as popular but it is growing. I really recommend using nestjs.

Is Nest JS frontend or backend?

What is NestJS? NestJS is an open-source, extensible, versatile, progressive Node. Js framework for creating compelling and demanding backend systems. It's currently the fastest-growing Node.

Why nest JS is better?

Nest. JS helps build lightweight, well-structured and amazing microservices and helps evolve the technology stack. The microservice architecture enables the rapid, frequent and reliable delivery of large, complex applications. Out-of-the-box tools and features make development, extension, and maintenance efficient.

Is Nest js a backend?

NestJS is a relatively new option in backend development, with many features for building and deploying enterprise services quickly and following the principles of SOLID and 12-factor applications.

What is the default exception filter in nestjs?

The default exception filter is called BaseExceptionFilter. We can look into the source code of NestJS and inspect its behavior. // ... // ... // ... // ... Every time there is an error in our application, the catch method runs. There are a few essential things we can get from the above code. Nest expects us to use the HttpException class.

How does nestjs handle database migrations?

Database migrations with TypeORM NestJS shines when it comes to handling errors and validating data. A lot of that is thanks to using decorators. In this article, we go through features that NestJS provides us with, such as Exception filters and Validation pipes. The code from this series results in this repository.

What does nestjs have to offer?

In this article, we go through features that NestJS provides us with, such as Exception filters and Validation pipes. The code from this series results in this repository. It aims to be an extended version of the official Nest framework TypeScript starter. Nest has an exception filter that takes care of handling the errors in our application.

How to override httpexception in nestjs?

If we provide a string as the definition of the response, NestJS serialized it into an object containing two properties: We can override the above behavior by providing an object as the first argument of the HttpException constructor. We can often find ourselves throwing similar exceptions more than once.


1 Answers

Update:

npm run build && npm run start fixed it

like image 183
Istiyak Tailor Avatar answered Oct 17 '22 03:10

Istiyak Tailor