<!-- mobian-agent-page publisher="dailydev" canonical="https://daily.dev/posts/why-do-we-need-nest-js-when-node-js-already-exists--xoezfuya1" -->

---
title: Why Do We Need Nest.js When Node.js Already Exists?
description: NestJS was created to address the architectural shortcomings of plain Node.js and Express.js when building large-scale backend applications. While Node.js...
canonical: https://daily.dev/posts/why-do-we-need-nest-js-when-node-js-already-exists--xoezfuya1
twitter:card: summary_large_image
twitter:site: @dailydotdev
og:type: website
og:site_name: daily.dev
og:title: Why Do We Need Nest.js When Node.js Already Exists? | daily.dev
og:description: NestJS was created to address the architectural shortcomings of plain Node.js and Express.js when building large-scale backend applications. While Node.js...
og:url: https://daily.dev/posts/why-do-we-need-nest-js-when-node-js-already-exists--xoezfuya1
og:image: https://api.daily.dev/og/posts/XoeZfuya1.png
og:image:alt: Why Do We Need Nest.js When Node.js Already Exists?
og:image:width: 1200
og:image:height: 630
og:locale: en
---

> ## Documentation Index
> Fetch the complete documentation index at: https://daily.dev/llms.txt
> Use this file to discover all available pages before exploring further.

# Why Do We Need Nest.js When Node.js Already Exists?

**[Medium](https://daily.dev/sources/medium_js)** · 6 min read · 2 upvotes · 0 comments

## Summary

NestJS was created to address the architectural shortcomings of plain Node.js and Express.js when building large-scale backend applications. While Node.js provides a runtime and Express offers minimal routing, neither enforces code structure, leading to unmaintainable codebases on large teams. NestJS solves this by introducing convention-over-configuration, native TypeScript support, built-in dependency injection and IoC containers, modular architecture for scalability, and an all-inclusive toolkit of officially maintained features. The result is a structured, testable, and enterprise-ready framework that sits on top of Node.js rather than replacing it.

## Full article

daily.dev links to this article rather than hosting it. Read it at the original source: <https://medium.com/@dhananjayayapa99/why-do-we-need-nest-js-when-node-js-already-exists-328857d63e36>

## Questions this post answers

### What is the difference between Node.js and NestJS?

Node.js is a runtime environment that lets JavaScript run on a server but enforces no application structure, while NestJS is a framework built on top of Node.js that provides an opinionated architecture with modules, controllers, and dependency injection. NestJS does not replace Node.js; it organizes how Node.js applications are structured and maintained, similar to comparing a car engine to a complete car.

_Developers weighing Node.js versus NestJS for a new backend can track framework comparisons like this on daily.dev._

### Why would I choose NestJS over Express for a Node.js backend?

NestJS enforces convention over configuration, native TypeScript support, and built-in dependency injection, whereas Express leaves structure, typing, and DI entirely up to developers via manual wiring or third-party libraries. This reduces tribal knowledge, catches type errors early, and produces a modular, testable, microservice-ready codebase, at the cost of Express's minimal-setup flexibility for small projects.

_Teams deciding between Express and NestJS can follow framework trade-off discussions on daily.dev._

### How does dependency injection work in NestJS compared to manually instantiating classes in Express?

NestJS uses a built-in Inversion of Control (IoC) container that automatically creates and injects services into a class constructor, such as injecting a UserService into a UserController, instead of manually writing `new UserService()` as in typical Express or plain Node.js code. This produces loosely coupled, more testable components without needing external DI libraries.

_Backend developers implementing dependency injection patterns can dig deeper into NestJS architecture via daily.dev._

## Similar posts on daily.dev

- [Intro to Nest.js: Server-side JavaScript development on Node](https://daily.dev/posts/intro-to-nest-js-server-side-javascript-development-on-node-2bm9sgdhw) · InfoWorld · 10 upvotes · 0 comments

---

Tags: [#nodejs](https://daily.dev/tags/nodejs), [#typescript](https://daily.dev/tags/typescript), [#dependency-injection](https://daily.dev/tags/dependency-injection), [#nestjs](https://daily.dev/tags/nestjs)

[View this post on daily.dev](https://daily.dev/posts/why-do-we-need-nest-js-when-node-js-already-exists--xoezfuya1)

```json
{"@context":"https://schema.org","@graph":[{"@type":"Organization","@id":"https://daily.dev/#organization","name":"daily.dev","url":"https://daily.dev","logo":{"@type":"ImageObject","url":"https://daily.dev/apple-touch-icon.png","width":180,"height":180},"sameAs":["https://twitter.com/dailydotdev","https://github.com/dailydotdev","https://www.linkedin.com/company/daily-dev-ltd"]},{"@type":"WebSite","@id":"https://daily.dev/#website","url":"https://daily.dev","name":"daily.dev","publisher":{"@id":"https://daily.dev/#organization"},"potentialAction":{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https://daily.dev/search?q={search_term_string}"},"query-input":"required name=search_term_string"}}]}
{"@context":"https://schema.org","@type":"TechArticle","headline":"Why Do We Need Nest.js When Node.js Already Exists?","url":"https://daily.dev/posts/why-do-we-need-nest-js-when-node-js-already-exists--xoezfuya1","mainEntityOfPage":{"@type":"WebPage","@id":"https://daily.dev/posts/why-do-we-need-nest-js-when-node-js-already-exists--xoezfuya1"},"datePublished":"2026-07-25T12:17:45.760Z","dateModified":"2026-09-14T08:58:08.575Z","description":"NestJS was created to address the architectural shortcomings of plain Node.js and Express.js when building large-scale backend applications. While Node.js...","image":"https://media.daily.dev/image/upload/f_auto,q_auto/v1/posts/5a823a86dcedbc48d1aa23ef6a41f862?_a=AQAEuop","thumbnailUrl":"https://media.daily.dev/image/upload/f_auto,q_auto/v1/posts/5a823a86dcedbc48d1aa23ef6a41f862?_a=AQAEuop","isAccessibleForFree":true,"articleSection":"Medium","inLanguage":"en","publisher":{"@type":"Organization","name":"daily.dev","url":"https://daily.dev","logo":{"@type":"ImageObject","url":"https://daily.dev/apple-touch-icon.png","width":180,"height":180}},"author":{"@type":"Organization","name":"Medium","logo":"https://media.daily.dev/image/upload/t_logo,f_auto/v1/logos/medium","url":"https://daily.dev/sources/medium_js"},"commentCount":0,"discussionUrl":"https://daily.dev/posts/why-do-we-need-nest-js-when-node-js-already-exists--xoezfuya1","interactionStatistic":[{"@type":"InteractionCounter","interactionType":{"@type":"LikeAction"},"userInteractionCount":2},{"@type":"InteractionCounter","interactionType":{"@type":"CommentAction"},"userInteractionCount":0}],"keywords":"nodejs,typescript,dependency-injection,nestjs","timeRequired":"PT6M"}
{"@context":"https://schema.org","@type":"BreadcrumbList","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https://daily.dev"},{"@type":"ListItem","position":2,"name":"Medium","item":"https://daily.dev/sources/medium_js"},{"@type":"ListItem","position":3,"name":"Why Do We Need Nest.js When Node.js Already Exists?"}]}
{"@context":"https://schema.org","@type":"FAQPage","@id":"https://daily.dev/posts/why-do-we-need-nest-js-when-node-js-already-exists--xoezfuya1#faq","mainEntity":[{"@type":"Question","name":"What is the difference between Node.js and NestJS?","acceptedAnswer":{"@type":"Answer","text":"Node.js is a runtime environment that lets JavaScript run on a server but enforces no application structure, while NestJS is a framework built on top of Node.js that provides an opinionated architecture with modules, controllers, and dependency injection. NestJS does not replace Node.js; it organizes how Node.js applications are structured and maintained, similar to comparing a car engine to a complete car. Developers weighing Node.js versus NestJS for a new backend can track framework comparisons like this on daily.dev."}},{"@type":"Question","name":"Why would I choose NestJS over Express for a Node.js backend?","acceptedAnswer":{"@type":"Answer","text":"NestJS enforces convention over configuration, native TypeScript support, and built-in dependency injection, whereas Express leaves structure, typing, and DI entirely up to developers via manual wiring or third-party libraries. This reduces tribal knowledge, catches type errors early, and produces a modular, testable, microservice-ready codebase, at the cost of Express's minimal-setup flexibility for small projects. Teams deciding between Express and NestJS can follow framework trade-off discussions on daily.dev."}},{"@type":"Question","name":"How does dependency injection work in NestJS compared to manually instantiating classes in Express?","acceptedAnswer":{"@type":"Answer","text":"NestJS uses a built-in Inversion of Control (IoC) container that automatically creates and injects services into a class constructor, such as injecting a UserService into a UserController, instead of manually writing `new UserService()` as in typical Express or plain Node.js code. This produces loosely coupled, more testable components without needing external DI libraries. Backend developers implementing dependency injection patterns can dig deeper into NestJS architecture via daily.dev."}}]}
```

