Tutorial: NestJS for Node.js applications
© Shutterstock / Lana_Samcorp
By now, Node.js isn’t a small-time-player anymore when it comes to backend technology. However, the acceptance and distribution of the platform have only increased in recent years, so that more and more developers have to approach this technology. Node.js’ lightweight character is its biggest advantage, but nothing comes drawback-free. Sebastian Springer and Khaled Labidi explain more in this tutorial.
Furthermore, Node.js doesn’t set any structure for applications. This starts with the missing type system and ends with the structure directory. Node.js developers are completely free in their application design, which is an almost insurmountable hurdle for newcomers. It is at this point where frameworks, such as Nest.js, come into play.
Nest.js is a framework written in TypeScript, which represents an abstraction layer above the HTTP module of Node.js. There is another abstraction layer between Node.js and Nest.js, which is formed by a web application framework. The framework Express is used here by default. However, Nest.js is designed in such a flexible way that this layer can be exchanged with just a few lines of code. Every abstraction layer adds additional features and interfaces, which make the implementation of applications much easier. TypeScript significantly reduces the initial hurdle for users who are switching from strictly typed languages. At the same time, developers can benefit from the advantages of a typed language.