NestJS logo

NestJS

A progressive Node.js framework for building efficient and scalable server-side applications by @kammysliwiec.
436
594
+ 1
145

What is NestJS?

Nest is a framework for building efficient, scalable Node.js server-side applications. It uses progressive JavaScript, is built with TypeScript (preserves compatibility with pure JavaScript) and combines elements of OOP (Object Oriented Programming), FP (Functional Programming), and FRP (Functional Reactive Programming). Under the hood, Nest makes use of Express, but also, provides compatibility with a wide range of other libraries, like e.g. Fastify, allowing for easy use of the myriad third-party plugins which are available.
NestJS is a tool in the Frameworks (Full Stack) category of a tech stack.
NestJS is an open source tool with 27.2K GitHub stars and 2.3K GitHub forks. Here’s a link to NestJS's open source repository on GitHub

Who uses NestJS?

Companies
61 companies reportedly use NestJS in their tech stacks, including qfl-stack, Frontend, and Our Stack.

Developers
362 developers on StackShare have stated that they use NestJS.
Private Decisions at about NestJS

Here are some stack decisions, common use cases and reviews by members of with NestJS in their tech stack.

Louai Hamada
Louai Hamada
Full Stack Web Developer · | 5 upvotes · 5.7K views

I'm planning with a small team to create an application which is a platform for restaurants. I'm on the backend almost alone currently. I'm going to use Node.js for that, and I'm very fond of TypeScript, and I worked before mostly with ExpressJS. The team may get bigger as the application becomes bigger and more successful, so I have the Scalability concern in mind now, and I was considering these options: 1) Use Node+Express+Typescript 2) Use Node+NestJs (which utilizes Typescript by default)

Option 2 is enticing to me because recently I came to love NestJS and it provides more scalability for the project and uses Typescript in the best way and uses Express under the hood. Also I come from an Angular 2 background, which I think is the best frontend framework (my opinion, and I know React quite well), which makes Nest feel familiar to me because of the similarity between Nest and Angular. Option 1 on the other hand uses Express which is a minimalist framework, very popular one, but it doesn't provide the same scalability and brings decision fatigue about what to combine with it and may not utilize Typescript in the best way. Yet, on the other hand, it is flexible and it may be easier to manipulate things in different ways with it. Another very important thing is that it would be easier in my view to hire Node developers with skills in Express than NestJs. The majority of Node developers are much more familiar with JavaScript and Express.

What is your advice and why? I would love to hear especially from developers who worked on both Express and Nest

See more
Public Decisions about NestJS

Here are some stack decisions, common use cases and reviews by companies and developers who chose NestJS in their tech stack.

Simon Reymann
Simon Reymann
Senior Fullstack Developer at QUANTUSflow Software GmbH · | 22 upvotes · 266.3K views

Our whole Node.js backend stack consists of the following tools:

  • Lerna as a tool for multi package and multi repository management
  • npm as package manager
  • NestJS as Node.js framework
  • TypeScript as programming language
  • ExpressJS as web server
  • Swagger UI for visualizing and interacting with the API’s resources
  • Postman as a tool for API development
  • TypeORM as object relational mapping layer
  • JSON Web Token for access token management

The main reason we have chosen Node.js over PHP is related to the following artifacts:

  • Made for the web and widely in use: Node.js is a software platform for developing server-side network services. Well-known projects that rely on Node.js include the blogging software Ghost, the project management tool Trello and the operating system WebOS. Node.js requires the JavaScript runtime environment V8, which was specially developed by Google for the popular Chrome browser. This guarantees a very resource-saving architecture, which qualifies Node.js especially for the operation of a web server. Ryan Dahl, the developer of Node.js, released the first stable version on May 27, 2009. He developed Node.js out of dissatisfaction with the possibilities that JavaScript offered at the time. The basic functionality of Node.js has been mapped with JavaScript since the first version, which can be expanded with a large number of different modules. The current package managers (npm or Yarn) for Node.js know more than 1,000,000 of these modules.
  • Fast server-side solutions: Node.js adopts the JavaScript "event-loop" to create non-blocking I/O applications that conveniently serve simultaneous events. With the standard available asynchronous processing within JavaScript/TypeScript, highly scalable, server-side solutions can be realized. The efficient use of the CPU and the RAM is maximized and more simultaneous requests can be processed than with conventional multi-thread servers.
  • A language along the entire stack: Widely used frameworks such as React or AngularJS or Vue.js, which we prefer, are written in JavaScript/TypeScript. If Node.js is now used on the server side, you can use all the advantages of a uniform script language throughout the entire application development. The same language in the back- and frontend simplifies the maintenance of the application and also the coordination within the development team.
  • Flexibility: Node.js sets very few strict dependencies, rules and guidelines and thus grants a high degree of flexibility in application development. There are no strict conventions so that the appropriate architecture, design structures, modules and features can be freely selected for the development.
See more
Kevin Vogel
Kevin Vogel
Lead Software Developer at Kargo · | 5 upvotes · 41.8K views
Shared insights
on
NestJSNestJS
at

Since I got good experience with Spring (Java) and Angular ( TypeScript), I was happy when I found NestJS, which got it's inspiration of these both frameworks. It brings Dependency Injection to TypeScript's back-end world, which is super helpful to create high salable and clean projects.

Nest.js Introduction

Nest is a framework for building efficient, scalable Node.js server-side applications. It uses progressive JavaScript, is built with and fully supports TypeScript (yet still enables developers to code in pure JavaScript) and combines elements of OOP (Object Oriented Programming), FP (Functional Programming), and FRP (Functional Reactive Programming).

Under the hood, Nest makes use of robust HTTP Server frameworks like Express (the default) and Fastify. Nest provides a level of abstraction above these frameworks, but can also expose their APIs directly to the developer. This allows for easy use of the myriad third-party modules which are available for each platform.

Philosophy

In recent years, thanks to Node.js, JavaScript has become the “lingua franca” of the web for both front and backend applications. This has given rise to awesome projects like Angular, React and Vue, which improve developer productivity and enable the construction of fast, testable, and extensible frontend applications. However, while plenty of superb libraries, helpers, and tools exist for Node (and server-side JavaScript), none of them effectively solve the main problem - architecture.

Nest provides an out-of-the-box application architecture which allows developers and teams to create highly testable, scalable, loosely coupled, and easily maintainable applications.

Source: https://docs.nestjs.com/

See more
Louai Hamada
Louai Hamada
Full Stack Web Developer · | 5 upvotes · 5.7K views

I'm planning with a small team to create an application which is a platform for restaurants. I'm on the backend almost alone currently. I'm going to use Node.js for that, and I'm very fond of TypeScript, and I worked before mostly with ExpressJS. The team may get bigger as the application becomes bigger and more successful, so I have the Scalability concern in mind now, and I was considering these options: 1) Use Node+Express+Typescript 2) Use Node+NestJs (which utilizes Typescript by default)

Option 2 is enticing to me because recently I came to love NestJS and it provides more scalability for the project and uses Typescript in the best way and uses Express under the hood. Also I come from an Angular 2 background, which I think is the best frontend framework (my opinion, and I know React quite well), which makes Nest feel familiar to me because of the similarity between Nest and Angular. Option 1 on the other hand uses Express which is a minimalist framework, very popular one, but it doesn't provide the same scalability and brings decision fatigue about what to combine with it and may not utilize Typescript in the best way. Yet, on the other hand, it is flexible and it may be easier to manipulate things in different ways with it. Another very important thing is that it would be easier in my view to hire Node developers with skills in Express than NestJs. The majority of Node developers are much more familiar with JavaScript and Express.

What is your advice and why? I would love to hear especially from developers who worked on both Express and Nest

See more
Gabriel Pa
Gabriel Pa
CEO at NaoLogic Inc · | 2 upvotes · 146.1K views
Shared insights
on
NestJSNestJSNode.jsNode.js
at

We started using NestJS even more and replaced our Node.js IPC for microservices with the native decorator of NestJS . It's more stable, you don't have to worry about connection status and .toPromise() works great. Same for

See more

NestJS's Features

  • Extensible - Gives you true flexibility by allowing use of any other libraries thanks to modular architecture.
  • Versatile - An adaptable ecosystem that is a fully-fledged backbone for all kinds of server-side applications.
  • Progressive - Takes advantage of latest JavaScript features, bringing design patterns and mature solutions to node.js world.

NestJS Alternatives & Comparisons

What are some alternatives to NestJS?
AdonisJS
It is a Node.js Framework which is highly focused on developer ergonomics, stability and confidence.
FeathersJS
Feathers is a real-time, micro-service web framework for NodeJS that gives you control over your data via RESTful resources, sockets and flexible plug-ins.
Koa
Koa aims to be a smaller, more expressive, and more robust foundation for web applications and APIs. Through leveraging generators Koa allows you to ditch callbacks and greatly increase error-handling. Koa does not bundle any middleware.
LoopBack
A highly-extensible, open-source Node.js framework that enables you to create dynamic end-to-end REST APIs with little or no coding. Connect to multiple data sources, write business logic in Node.js, glue on top of your existing services and data, connect using JS, iOS & Android SDKs.
hapi
hapi is a simple to use configuration-centric framework with built-in support for input validation, caching, authentication, and other essential facilities for building web applications and services.
See all alternatives

NestJS's Followers
594 developers follow NestJS to keep up with related blogs and decisions.
czerwiukk
ngyam
Sathyanarayanan Vaithianathan
Y太郎 Y
ali-elrediny
Paweł Kumanowski
Uch Sarath
Jose Jaramillo
Fabio Valencio
chevon williams