JavaScript rules the world! With the rise of Node.Js JavaScript can be used outside the browser and has become the language of everything.

This evolution raised different Node.js frameworks to develop server-side JavaScript applications. Express, Hapi or Meteor JS are just some amongst them.

Lately, a new kid arrived on the block. NestJS!

NestJS 🦁

NestJS is a fully-featured open-source NodeJS framework that enables us to create compelling and demanding backend systems. It is currently the fastest raising NodeJS framework written in Typescript.

Nest enables us to write highly testable, scalable, loosely coupled, and easily maintainable applications. To do so, it uses express under the hood. It acts as another layer on top and makes a lot of things easier for us.

Nest brings scalable Node.js servers to a whole new level

Let’s have a more detailed look at some of the reasons that make Nest so great and why you should consider to write your next backend project in NestJS.

Perfect for Angular developers! 💯 🤩

Nest is an excellent framework for all kind of developers. But if you are an Angular developer, chances are very high that you’re going to like Nest.

Angular deeply inspires NestJS, and it’s concepts. Therefore for Angular developers, it is almost a no-brainer getting familiar with the core concepts of Nest.

Angular developers quickly find themselves home in Nest. Similar concepts, structure and naming conventions.

Coding in Nest nearly feels like coding Angular in the backend. Besides the concepts, it also works excellent with Angular Universal.

In any case, it makes sense to consider NestJS as a framework for your backend applications if you are an Angular developer its almost a must because the learning curve is so shallow.

Nest apps are written in Typescript

NestJS applications are written in Typescript.

Typescript is a typed superset of Javascript that supports us during runtime and compile time.

It empowers us with the flexibility of Javascript and the robustness of a typed language. This robustness is especially useful for larger applications. You could also think of Typescript as Javascript that scales.

The optional typing system empowers tooling, better IntelliSense, refactoring, and better overall development experience. Typescript also gives us access to the latest features that haven’t made it yet to Javascript.

Creating scalable applications is one of the main focuses of NestJS. Therefore it is evident for Nest to benefit from TypeScript.

Follow me on Twitter or medium to get notified about my newest blog posts!🐥

Architecture — Inspired by Angular 🏠

Software projects are usually not written by one person but by a team. A group of developers with different ideas and different opinions who all work on the same codebase.

For each team, it’s essential to have a common understanding of how code should be written and organized. Those guidelines ensure that we don’t just code in our preferred style but in a consistent manner that everybody on the team can understand.

Most server-side JavaScript frameworks do not deal with architecture. They offer you a lot of flexibility on how to do and organize things. Therefore, in my experience at least, it requires a lot of arrangement to have clear ways and guidelines on how to write things.

That’s where NestJS widely differs from the other NodeJS frameworks. While other frameworks don’t offer too many architectonical concepts out of the box, NestJS provides us with an opinionated project setup. It was one of the main reasons it was built. To solve architecture!

Since Nest is inspired by Angular, it also uses the main building blocks that we encounter in Angular. Let’s have a look at the most important ones.

Modules 📦

Modules are the basic building blocks of every Nest application. Each Nest application contains at least one module, the Appmodule .

Technically an application could be written with only one module. This is not recommended as it doesn’t make sense once your application starts to grow. The main reasons for a module is to group related features as components , services , and controllers together.