typescript - Is NestJs a right choice for a node.js beginner or should I do something with Express first? - Stack Overflow
Why isn't Nest.Js as popular as Express?
Why nodejs engineers prefer express over nestjs? although nestjs forces good practice and proper architecture and it seems to be a right choice for complex and enterprise applications like asp.net and Spring. What are the limitations of nestjs compared to express? : node
Node Express / NestJS running on AWS Lambda - Are we doing it right?
I’m not sure about optimizations Amazon does for lambda functions. It might spawn them and kill them whenever. So persisting and speed is a thing if you want to host a whole server in a function. There is an extra app from aws to host node. I guess there is a reason to use that instead
More on reddit.comVideos
Nest.js & Typescript is a framework for enterprise-level applications which provides a clear structure and guidelines of how things should be.
So for the beginner pros are:
- OOP (SOLID) in TS/JS
- Introducing the latest LTS features of TS, like decorators, dependency injections, and so on.
- In build ESLint, prettier, and monorepo mod which can be activated via Nest CLI.
- Easy deployment via docker-compose for microservice architecture.
You can't achieve these things via such old frameworks like Express + (something else)
As for the cons:
It's hard to understand why there is a
contollerfile,servicefile, and why there are multiplemodulefiles withforRootandforRootAsyncconnections to DBs and so on.In time, it will be difficult to write/build projects w/o Nestjs because it's very good, but has a bit different pattern of programming.
@Afaq mentioned that TS is the future (and Nestjs as well), but it's a bit wrong. JS as a native language always inherits the best available options from TS, as it did with CoffeeScript and so on. So one day in the future, you could wake up and look at your TS codebase as a legacy without appropriate support, while native technology goes forward.
Contrary to popular opinion, I'll suggest to get to know express a bit, make a plain simple server with JS and express (no fancy framweorks), convert it to TS. Get to know express library and how it works. NestJS abstracts a lot of the express'y' stuff. Its always good to know how it works under the hood.
I came from plain old JS + express to NestJS, and it feels good to know how it works under the hood.
It need not be a big app, just create a TODO with Auth,Validation and DB.
There is nothing wrong starting with NestJS though.