{"id":150594,"date":"2026-06-11T08:29:14","date_gmt":"2026-06-11T08:29:14","guid":{"rendered":"\/tutorials\/?p=150594"},"modified":"2026-06-11T08:29:17","modified_gmt":"2026-06-11T08:29:17","slug":"what-is-nestjs","status":"publish","type":"post","link":"\/tutorials\/what-is-nestjs","title":{"rendered":"What is NestJS and how it works"},"content":{"rendered":"<p>NestJS is a TypeScript-first backend framework for building server-side applications with Node.js. Strong TypeScript support is one of its defining features, providing type safety, better tooling, improved code completion, and easier maintenance in large codebases.<\/p><p>It runs on top of established HTTP platforms such as Express or Fastify, giving developers access to the Node.js ecosystem while providing a structured architecture for building APIs and backend services. <\/p><p>At the core of NestJS is a modular architecture. Applications are divided into modules that group related functionality, making it easier to organize features and keep responsibilities separate. <\/p><p>Within these modules, controllers handle incoming HTTP requests, while services contain the business logic that processes data and performs application-specific tasks.<\/p><p>NestJS also includes a built-in dependency injection system. The framework automatically provides the required services where they are needed, improving code reusability, simplifying testing, and reducing tight coupling between application components.<\/p><p>Developers widely use NestJS to build REST APIs, but it also supports GraphQL, WebSockets, microservices, and other communication patterns.<\/p><p>Understanding how modules, controllers, services, dependency injection, REST APIs, and TypeScript work together is essential for understanding how NestJS operates. <\/p><p>These concepts form the foundation of the framework and explain why it has become a popular choice for building scalable and maintainable backend applications.<\/p><h2 class=\"wp-block-heading\" id=\"h-what-are-the-foundations-of-nestjs\">What are the foundations of NestJS?<\/h2><p>Modular architecture provides the structure for dividing <a href=\"\/tutorials\/what-is-web-application\" data-wpel-link=\"internal\" rel=\"follow\">web applications<\/a> into separate features, while TypeScript support adds type safety, development tooling, and consistency across the codebase. <\/p><p>Together, these foundations create the framework that the rest of the NestJS ecosystem builds upon.<\/p><h3 class=\"wp-block-heading\">Modular architecture<\/h3><div class=\"wp-block-image\">\n<figure data-wp-context='{\"imageId\":\"6a2ab2f398d79\"}' data-wp-interactive=\"core\/image\" data-wp-key=\"6a2ab2f398d79\" class=\"aligncenter size-large wp-lightbox-container\"><img decoding=\"async\" width=\"1408\" height=\"768\" data-wp-class--hide=\"state.isContentHidden\" data-wp-class--show=\"state.isContentVisible\" data-wp-init=\"callbacks.setButtonStyles\" data-wp-on--click=\"actions.showLightbox\" data-wp-on--load=\"callbacks.setButtonStyles\" data-wp-on-window--resize=\"callbacks.setButtonStyles\" src=\"https:\/\/imagedelivery.net\/LqiWLm-3MGbYHtFuUbcBtA\/wp-content\/uploads\/sites\/2\/2026\/06\/what-is-nestjs-modules.jpg\/public\" alt=\"A diagram showing a central root module connected to four feature modules (authentication, user management, payment, notification) via directional lines, set against a subtle circuit-trace purple background.\" class=\"wp-image-150598\" srcset=\"https:\/\/imagedelivery.net\/LqiWLm-3MGbYHtFuUbcBtA\/wp-content\/uploads\/sites\/2\/2026\/06\/what-is-nestjs-modules.jpg\/w=1408,fit=scale-down 1408w, https:\/\/imagedelivery.net\/LqiWLm-3MGbYHtFuUbcBtA\/wp-content\/uploads\/sites\/2\/2026\/06\/what-is-nestjs-modules.jpg\/w=300,fit=scale-down 300w, https:\/\/imagedelivery.net\/LqiWLm-3MGbYHtFuUbcBtA\/wp-content\/uploads\/sites\/2\/2026\/06\/what-is-nestjs-modules.jpg\/w=1024,fit=scale-down 1024w, https:\/\/imagedelivery.net\/LqiWLm-3MGbYHtFuUbcBtA\/wp-content\/uploads\/sites\/2\/2026\/06\/what-is-nestjs-modules.jpg\/w=150,fit=scale-down 150w, https:\/\/imagedelivery.net\/LqiWLm-3MGbYHtFuUbcBtA\/wp-content\/uploads\/sites\/2\/2026\/06\/what-is-nestjs-modules.jpg\/w=768,fit=scale-down 768w\" sizes=\"(max-width: 1408px) 100vw, 1408px\" \/><button class=\"lightbox-trigger\" type=\"button\" aria-haspopup=\"dialog\" aria-label=\"Enlarge\" data-wp-init=\"callbacks.initTriggerButton\" data-wp-on--click=\"actions.showLightbox\" data-wp-style--right=\"state.imageButtonRight\" data-wp-style--top=\"state.imageButtonTop\">\n\t\t\t<svg xmlns=\"http:\/\/www.w3.org\/2000\/svg\" width=\"12\" height=\"12\" fill=\"none\" viewbox=\"0 0 12 12\">\n\t\t\t\t<path fill=\"#fff\" d=\"M2 0a2 2 0 0 0-2 2v2h1.5V2a.5.5 0 0 1 .5-.5h2V0H2Zm2 10.5H2a.5.5 0 0 1-.5-.5V8H0v2a2 2 0 0 0 2 2h2v-1.5ZM8 12v-1.5h2a.5.5 0 0 0 .5-.5V8H12v2a2 2 0 0 1-2 2H8Zm2-12a2 2 0 0 1 2 2v2h-1.5V2a.5.5 0 0 0-.5-.5H8V0h2Z\"><\/path>\n\t\t\t<\/svg>\n\t\t<\/button><\/figure>\n<\/div><p>Modular architecture is a software design approach that divides an application into independent, self-contained modules. Each module represents a specific feature or business capability and contains the components required to support that functionality.<\/p><p>Every NestJS application contains at least one root module, while larger applications are composed of multiple feature modules that work together.<\/p><p>Each module serves as a boundary for a specific area of the application. Related functionality stays inside the same module, allowing features to be separated into distinct parts of the codebase.<\/p><p>Common examples include authentication, user management, payment, and notification modules. An authentication module provides functionality for user authentication and access control, while a payment module handles transaction processing and payment provider integrations.<\/p><p>As applications grow, additional features are introduced as new modules. Each module focuses on a specific responsibility and becomes part of the overall application structure.<\/p><p>The module system provides the framework that organizes a NestJS application. Once functionality is divided into modules, NestJS uses controllers and application logic inside those modules to handle incoming requests and generate responses.<\/p><h3 class=\"wp-block-heading\">TypeScript support<\/h3><p>NestJS uses TypeScript as a first-class development feature. The framework is built with TypeScript and uses its type system throughout application development, making typed controllers, services, and other application components a standard part of the development workflow.<\/p><p>TypeScript helps define clear contracts between different parts of an application. Interfaces describe the structure of data, while decorators provide metadata that NestJS uses to configure routes, modules, providers, and other framework features. <\/p><p>Together, these tools create a more consistent development experience across the codebase.<\/p><p>Modern development tools also benefit from TypeScript integration. Editors can provide autocomplete suggestions, parameter hints, navigation features, and code analysis based on type information. <\/p><p>Developers can inspect services, controllers, and data structures more efficiently while working on larger projects.<\/p><p>Type checking helps identify errors before the application runs. Mismatched data types, missing properties, and incorrect method usage can be detected during development, reducing the likelihood of runtime issues and making code changes easier to verify.<\/p><p>TypeScript also helps maintain consistency as applications grow. Shared types, interfaces, and application contracts make it easier for multiple developers to work within the same codebase while following the same data structures and development patterns.<\/p><p>Although TypeScript is the default choice, NestJS also supports standard JavaScript projects. Developers can use the framework without TypeScript, while still benefiting from the same application architecture and framework features.<\/p><h2 class=\"wp-block-heading\" id=\"h-what-are-nestjss-core-building-blocks\">What are NestJS&rsquo;s core building blocks?<\/h2><p>NestJS applications are assembled from reusable building blocks that each serve a specific purpose. <\/p><p>Services contain business logic, providers manage shared functionality, and dependency injection connects application components without creating tight coupling. <\/p><h3 class=\"wp-block-heading\">Services<\/h3><p>Services are reusable classes that contain backend business logic in a NestJS application. A service handles the work that should not live directly inside a controller, such as validating data, calculating values, querying a database, or sending an email.<\/p><p>Controllers receive requests and delegate tasks to services. For example, an authentication controller might receive a login request, then call a user validation service to check credentials. <\/p><p>A payment controller can receive a checkout request, then call a payment service to calculate totals, apply discounts, and prepare the transaction.<\/p><p>Separating logic into services keeps controllers focused on request handling. Controllers define the route, read request data, and return a response, while services implement the application rules that drive that request.<\/p><p>Services also help avoid duplicated backend logic. If user validation is needed during login, registration, and profile updates, the same validation service can support all three workflows. <\/p><p>If email sending is required after checkout, password reset, and account verification, a single email service can handle those actions from a single location.<\/p><p>Database operations are commonly implemented within services as well. An order service can create new orders, retrieve order history, update order status, and coordinate related database queries. <\/p><p>Keeping data access close to business logic gives each feature a clear place for processing and persistence.<\/p><h3 class=\"wp-block-heading\">Providers<\/h3><div class=\"wp-block-image\">\n<figure data-wp-context='{\"imageId\":\"6a2ab2f39c16a\"}' data-wp-interactive=\"core\/image\" data-wp-key=\"6a2ab2f39c16a\" class=\"aligncenter size-large wp-lightbox-container\"><img decoding=\"async\" width=\"1408\" height=\"768\" data-wp-class--hide=\"state.isContentHidden\" data-wp-class--show=\"state.isContentVisible\" data-wp-init=\"callbacks.setButtonStyles\" data-wp-on--click=\"actions.showLightbox\" data-wp-on--load=\"callbacks.setButtonStyles\" data-wp-on-window--resize=\"callbacks.setButtonStyles\" src=\"https:\/\/imagedelivery.net\/LqiWLm-3MGbYHtFuUbcBtA\/wp-content\/uploads\/sites\/2\/2026\/06\/what-is-nestjs-providers.jpg\/public\" alt=\"technical diagram showing a central NestJS Providers hub connected to Logging, Authentication, Caching, Database, Notifications, and Configuration\" class=\"wp-image-150600\" srcset=\"https:\/\/imagedelivery.net\/LqiWLm-3MGbYHtFuUbcBtA\/wp-content\/uploads\/sites\/2\/2026\/06\/what-is-nestjs-providers.jpg\/w=1408,fit=scale-down 1408w, https:\/\/imagedelivery.net\/LqiWLm-3MGbYHtFuUbcBtA\/wp-content\/uploads\/sites\/2\/2026\/06\/what-is-nestjs-providers.jpg\/w=300,fit=scale-down 300w, https:\/\/imagedelivery.net\/LqiWLm-3MGbYHtFuUbcBtA\/wp-content\/uploads\/sites\/2\/2026\/06\/what-is-nestjs-providers.jpg\/w=1024,fit=scale-down 1024w, https:\/\/imagedelivery.net\/LqiWLm-3MGbYHtFuUbcBtA\/wp-content\/uploads\/sites\/2\/2026\/06\/what-is-nestjs-providers.jpg\/w=150,fit=scale-down 150w, https:\/\/imagedelivery.net\/LqiWLm-3MGbYHtFuUbcBtA\/wp-content\/uploads\/sites\/2\/2026\/06\/what-is-nestjs-providers.jpg\/w=768,fit=scale-down 768w\" sizes=\"(max-width: 1408px) 100vw, 1408px\" \/><button class=\"lightbox-trigger\" type=\"button\" aria-haspopup=\"dialog\" aria-label=\"Enlarge\" data-wp-init=\"callbacks.initTriggerButton\" data-wp-on--click=\"actions.showLightbox\" data-wp-style--right=\"state.imageButtonRight\" data-wp-style--top=\"state.imageButtonTop\">\n\t\t\t<svg xmlns=\"http:\/\/www.w3.org\/2000\/svg\" width=\"12\" height=\"12\" fill=\"none\" viewbox=\"0 0 12 12\">\n\t\t\t\t<path fill=\"#fff\" d=\"M2 0a2 2 0 0 0-2 2v2h1.5V2a.5.5 0 0 1 .5-.5h2V0H2Zm2 10.5H2a.5.5 0 0 1-.5-.5V8H0v2a2 2 0 0 0 2 2h2v-1.5ZM8 12v-1.5h2a.5.5 0 0 0 .5-.5V8H12v2a2 2 0 0 1-2 2H8Zm2-12a2 2 0 0 1 2 2v2h-1.5V2a.5.5 0 0 0-.5-.5H8V0h2Z\"><\/path>\n\t\t\t<\/svg>\n\t\t<\/button><\/figure>\n<\/div><p>Services are the most common type of provider, but NestJS providers are a broader concept. Providers are classes that NestJS can create, manage, and inject into other parts of the application through its dependency injection system. <\/p><p>Services, database connections, configuration managers, and other shared resources can all be registered as providers and reused throughout the application.<\/p><p>NestJS registers providers inside modules, making them available to other application components. Once registered, a provider becomes part of the application&rsquo;s internal service layer and can be used wherever the functionality is required.<\/p><p>Providers are used for shared backend functionality such as logging systems, authentication utilities, caching services, configuration management, and database connectors. <\/p><p>Rather than creating separate instances of the same functionality throughout the application, NestJS manages those shared resources through providers.<\/p><p>Providers support a wide range of shared application functions. Logging providers can record events across authentication, payment, and order management modules. <\/p><p>Database providers manage connections that services use to run queries and perform other data operations. <\/p><p>Caching providers store frequently accessed information and make it available across different parts of the application.<\/p><p>Providers also support integration between modules. Functionality defined in one module can be exposed and reused by another module through registered providers. <\/p><p>An authentication provider can be used by account management features, while a notification provider can support user registration, password recovery, and order confirmation workflows.<\/p><h3 class=\"wp-block-heading\">Dependency injection<\/h3><p>Dependency injection is a system that automatically supplies classes and services where they are needed. <\/p><p>Controllers and providers can use services without creating or configuring them directly. When a controller requires a user service or a provider requires a database service, NestJS resolves the dependency and makes it available automatically. The class only needs to declare what it depends on.<\/p><p>A controller can use an authentication service without needing to know how that service is created or configured. <\/p><p>The same principle applies to database services, logging providers, email services, and other shared application components.<\/p><p>Dependency injection also promotes service reuse. A single database service can support multiple controllers and providers throughout the application. <\/p><p>An email service can handle account verification, password reset notifications, and order confirmations without requiring separate implementations for each feature.<\/p><p>Testing becomes more straightforward because dependencies can be replaced with test versions during development.<\/p><p>A service that normally communicates with a database can be tested with a mock implementation, allowing application logic to be verified without connecting to external systems.<\/p><h2 class=\"wp-block-heading\" id=\"h-how-does-nestjs-handle-incoming-requests\">How does NestJS handle incoming requests?<\/h2><p>NestJS processes requests through a structured execution pipeline that routes requests, applies shared processing logic, enforces security rules, and transforms responses before they are returned to the client. <\/p><p>Controllers, middleware, guards, and interceptors each play a different role in that lifecycle.<\/p><h3 class=\"wp-block-heading\">Controllers and routing<\/h3><div class=\"wp-block-image\">\n<figure data-wp-context='{\"imageId\":\"6a2ab2f39f474\"}' data-wp-interactive=\"core\/image\" data-wp-key=\"6a2ab2f39f474\" class=\"aligncenter size-large wp-lightbox-container\"><img decoding=\"async\" width=\"1408\" height=\"768\" data-wp-class--hide=\"state.isContentHidden\" data-wp-class--show=\"state.isContentVisible\" data-wp-init=\"callbacks.setButtonStyles\" data-wp-on--click=\"actions.showLightbox\" data-wp-on--load=\"callbacks.setButtonStyles\" data-wp-on-window--resize=\"callbacks.setButtonStyles\" src=\"https:\/\/imagedelivery.net\/LqiWLm-3MGbYHtFuUbcBtA\/wp-content\/uploads\/sites\/2\/2026\/06\/what-is-nestjs-routing.jpg\/public\" alt=\"Diagram illustrating NestJS controllers and routing. Incoming HTTP requests (GET, POST, PUT, DELETE) flow through a central routing layer into organized controller modules\" class=\"wp-image-150603\" srcset=\"https:\/\/imagedelivery.net\/LqiWLm-3MGbYHtFuUbcBtA\/wp-content\/uploads\/sites\/2\/2026\/06\/what-is-nestjs-routing.jpg\/w=1408,fit=scale-down 1408w, https:\/\/imagedelivery.net\/LqiWLm-3MGbYHtFuUbcBtA\/wp-content\/uploads\/sites\/2\/2026\/06\/what-is-nestjs-routing.jpg\/w=300,fit=scale-down 300w, https:\/\/imagedelivery.net\/LqiWLm-3MGbYHtFuUbcBtA\/wp-content\/uploads\/sites\/2\/2026\/06\/what-is-nestjs-routing.jpg\/w=1024,fit=scale-down 1024w, https:\/\/imagedelivery.net\/LqiWLm-3MGbYHtFuUbcBtA\/wp-content\/uploads\/sites\/2\/2026\/06\/what-is-nestjs-routing.jpg\/w=150,fit=scale-down 150w, https:\/\/imagedelivery.net\/LqiWLm-3MGbYHtFuUbcBtA\/wp-content\/uploads\/sites\/2\/2026\/06\/what-is-nestjs-routing.jpg\/w=768,fit=scale-down 768w\" sizes=\"(max-width: 1408px) 100vw, 1408px\" \/><button class=\"lightbox-trigger\" type=\"button\" aria-haspopup=\"dialog\" aria-label=\"Enlarge\" data-wp-init=\"callbacks.initTriggerButton\" data-wp-on--click=\"actions.showLightbox\" data-wp-style--right=\"state.imageButtonRight\" data-wp-style--top=\"state.imageButtonTop\">\n\t\t\t<svg xmlns=\"http:\/\/www.w3.org\/2000\/svg\" width=\"12\" height=\"12\" fill=\"none\" viewbox=\"0 0 12 12\">\n\t\t\t\t<path fill=\"#fff\" d=\"M2 0a2 2 0 0 0-2 2v2h1.5V2a.5.5 0 0 1 .5-.5h2V0H2Zm2 10.5H2a.5.5 0 0 1-.5-.5V8H0v2a2 2 0 0 0 2 2h2v-1.5ZM8 12v-1.5h2a.5.5 0 0 0 .5-.5V8H12v2a2 2 0 0 1-2 2H8Zm2-12a2 2 0 0 1 2 2v2h-1.5V2a.5.5 0 0 0-.5-.5H8V0h2Z\"><\/path>\n\t\t\t<\/svg>\n\t\t<\/button><\/figure>\n<\/div><p>Controllers are the components responsible for handling incoming requests in a NestJS application. Each controller defines a set of routes and contains the methods that process requests sent to those routes.<\/p><p>NestJS uses route decorators to map URLs and HTTP methods to specific controller methods. Decorators such as <code>@Get()<\/code>, <code>@Post()<\/code>, <code>@Put()<\/code>, and <code>@Delete()<\/code> define which requests a method should handle and create the corresponding API endpoints.<\/p><p>When a request reaches the application, NestJS matches the request URL and HTTP method to a route defined inside a controller. After finding a matching route, the framework executes the associated controller method and returns the result as a response.<\/p><p>Controllers help organize API routes by grouping related endpoints together. An authentication controller might contain routes for user registration, login, and password recovery. A product controller can manage product listings, product details, and inventory updates. <\/p><p>Grouping related routes within the same controller creates a clear, predictable API structure.<\/p><p>The same routing approach applies to other application features. Each controller acts as a dedicated entry point for a specific area of application functionality.<\/p><p>Once a request reaches the correct controller, the application can execute the logic required to process data and generate a response.<\/p><h3 class=\"wp-block-heading\">Middleware<\/h3><p>Middleware is code that processes requests before they reach route handlers. It sits between the incoming request and the application&rsquo;s controllers, allowing common tasks to run before request processing continues.<\/p><p>NestJS uses middleware for request preprocessing and shared request-handling workflows. Middleware can inspect incoming requests, modify request data, perform checks, or execute supporting functionality before the request reaches the appropriate controller.<\/p><p>Logging is a common middleware use case. A logging middleware can record details such as request URLs, HTTP methods, response times, and client information for every incoming request. <\/p><p>Centralizing request logging in middleware keeps the behavior consistent across the application.<\/p><p>Middleware is also frequently used for validating authentication tokens. Before a protected route is processed, middleware can verify that a request contains a valid authentication token and reject unauthorized requests before it reaches application logic.<\/p><p>Request parsing is another common use case. Middleware can extract information from incoming requests, normalize data formats, or attach additional request metadata that controllers use later in the processing pipeline.<\/p><p>Because middleware operates before route handlers execute, the same behavior can be applied across multiple routes without repeating implementation details in individual controllers. <\/p><p>A single middleware can support hundreds of endpoints while maintaining consistent request processing throughout the application.<\/p><h3 class=\"wp-block-heading\">Guards<\/h3><p>Guards are authorization layers that control whether requests can access specific routes. They run before route handlers execute and determine whether a request has permission to proceed.<\/p><p>NestJS uses guards to enforce access control rules across an application. A guard can verify whether a user is authenticated, check assigned roles, or evaluate other authorization requirements before allowing access to a protected route.<\/p><p>Route protection is one of the most common guard use cases. An application can use guards to restrict authenticated account pages, prevent unauthorized access to API endpoints, or protect administrative functionality from regular users.<\/p><p>Role validation is another common responsibility. A guard can check whether a user has an administrator role before granting access to an admin dashboard, management panel, or reporting system. If the required role is missing, the request is denied before application logic runs.<\/p><p>Guards also help centralize security rules. Instead of adding authorization checks to every controller method, access requirements can be defined once and applied consistently across related routes and resources.<\/p><h3 class=\"wp-block-heading\">Interceptors<\/h3><div class=\"wp-block-image\">\n<figure data-wp-context='{\"imageId\":\"6a2ab2f3a30d3\"}' data-wp-interactive=\"core\/image\" data-wp-key=\"6a2ab2f3a30d3\" class=\"aligncenter size-large wp-lightbox-container\"><img decoding=\"async\" width=\"1408\" height=\"768\" data-wp-class--hide=\"state.isContentHidden\" data-wp-class--show=\"state.isContentVisible\" data-wp-init=\"callbacks.setButtonStyles\" data-wp-on--click=\"actions.showLightbox\" data-wp-on--load=\"callbacks.setButtonStyles\" data-wp-on-window--resize=\"callbacks.setButtonStyles\" src=\"https:\/\/imagedelivery.net\/LqiWLm-3MGbYHtFuUbcBtA\/wp-content\/uploads\/sites\/2\/2026\/06\/what-is-nestjs-interceptors.jpg\/public\" alt=\"Technical diagram illustrating interceptors in application architecture. A request-response pipeline flows from client through an interceptor component\" class=\"wp-image-150602\" srcset=\"https:\/\/imagedelivery.net\/LqiWLm-3MGbYHtFuUbcBtA\/wp-content\/uploads\/sites\/2\/2026\/06\/what-is-nestjs-interceptors.jpg\/w=1408,fit=scale-down 1408w, https:\/\/imagedelivery.net\/LqiWLm-3MGbYHtFuUbcBtA\/wp-content\/uploads\/sites\/2\/2026\/06\/what-is-nestjs-interceptors.jpg\/w=300,fit=scale-down 300w, https:\/\/imagedelivery.net\/LqiWLm-3MGbYHtFuUbcBtA\/wp-content\/uploads\/sites\/2\/2026\/06\/what-is-nestjs-interceptors.jpg\/w=1024,fit=scale-down 1024w, https:\/\/imagedelivery.net\/LqiWLm-3MGbYHtFuUbcBtA\/wp-content\/uploads\/sites\/2\/2026\/06\/what-is-nestjs-interceptors.jpg\/w=150,fit=scale-down 150w, https:\/\/imagedelivery.net\/LqiWLm-3MGbYHtFuUbcBtA\/wp-content\/uploads\/sites\/2\/2026\/06\/what-is-nestjs-interceptors.jpg\/w=768,fit=scale-down 768w\" sizes=\"(max-width: 1408px) 100vw, 1408px\" \/><button class=\"lightbox-trigger\" type=\"button\" aria-haspopup=\"dialog\" aria-label=\"Enlarge\" data-wp-init=\"callbacks.initTriggerButton\" data-wp-on--click=\"actions.showLightbox\" data-wp-style--right=\"state.imageButtonRight\" data-wp-style--top=\"state.imageButtonTop\">\n\t\t\t<svg xmlns=\"http:\/\/www.w3.org\/2000\/svg\" width=\"12\" height=\"12\" fill=\"none\" viewbox=\"0 0 12 12\">\n\t\t\t\t<path fill=\"#fff\" d=\"M2 0a2 2 0 0 0-2 2v2h1.5V2a.5.5 0 0 1 .5-.5h2V0H2Zm2 10.5H2a.5.5 0 0 1-.5-.5V8H0v2a2 2 0 0 0 2 2h2v-1.5ZM8 12v-1.5h2a.5.5 0 0 0 .5-.5V8H12v2a2 2 0 0 1-2 2H8Zm2-12a2 2 0 0 1 2 2v2h-1.5V2a.5.5 0 0 0-.5-.5H8V0h2Z\"><\/path>\n\t\t\t<\/svg>\n\t\t<\/button><\/figure>\n<\/div><p>Interceptors are components that transform requests or responses during application execution. They run before or after the application logic, allowing shared behavior to be applied across multiple routes.<\/p><p>An interceptor can standardize JSON responses across an application by ensuring that API endpoints return data in the same format. For example, an interceptor can add fields such as status information, timestamps, or metadata before returning a response to the client.<\/p><p>Interceptors are also useful for logging and performance monitoring. They can track how long requests take to complete, record execution details, and collect metrics without adding measurement code to individual controllers.<\/p><p>Caching addresses a different requirement. Frequently requested data can be stored and reused when the same request occurs again, reducing the need to repeat identical processing.<\/p><h2 class=\"wp-block-heading\" id=\"h-benefits-of-using-nestjs\">Benefits of using NestJS<\/h2><p>NestJS provides a structured way to build backend applications while reducing the amount of setup required for common development tasks. <\/p><p>Its main benefits include:<\/p><ul class=\"wp-block-list\">\n<li><strong>Better project organization.<\/strong> Application code remains easier to structure because NestJS encourages a clear separation between features, request handling, business logic, and shared functionality.<\/li>\n\n\n\n<li><strong>Earlier error detection.<\/strong> Development issues can be identified before deployment through TypeScript type checking, editor integrations, and static analysis tools.<\/li>\n\n\n\n<li><strong>Simpler application growth.<\/strong> New features can be added without restructuring the entire codebase because NestJS organizes functionality into independent modules.<\/li>\n\n\n\n<li><strong>Less manual dependency management.<\/strong> Shared services are automatically provided through the framework&rsquo;s dependency injection system, reducing the need for repetitive setup code.<\/li>\n\n\n\n<li><strong>Faster API development.<\/strong> Common backend requirements, such as routing, validation, authentication, and request handling, are supported by built-in framework features.<\/li>\n\n\n\n<li><strong>Greater deployment flexibility. <\/strong>Applications can run on either Express or Fastify, allowing developers to choose the HTTP framework that best matches their requirements.<\/li>\n\n\n\n<li><strong>Improved team collaboration.<\/strong> Consistent architectural patterns make it easier for multiple developers to work within the same project and understand existing code.<\/li>\n\n\n\n<li><strong>Easy integration with the Node.js ecosystem.<\/strong> Popular database libraries, ORMs, authentication tools, testing frameworks, and other backend technologies integrate seamlessly with NestJS applications.<\/li>\n<\/ul><h3 class=\"wp-block-heading\">NestJS vs. Express.js<\/h3><p>The main difference between NestJS and Express.js is the level of structure they impose on an application.<\/p><p>Express.js gives developers complete control over project organization and architecture, while NestJS provides predefined patterns for organizing application code and backend functionality.<\/p><p>Main differences between Express.js and NestJS across architecture, development workflow, and common use cases:<\/p><figure tabindex=\"0\" class=\"wp-block-table\"><table><tbody><tr><td colspan=\"1\" rowspan=\"1\"><p><strong>Feature<\/strong><\/p><\/td><td colspan=\"1\" rowspan=\"1\"><p><strong>Express.js<\/strong><\/p><\/td><td colspan=\"1\" rowspan=\"1\"><p><strong>NestJS<\/strong><\/p><\/td><\/tr><tr><td colspan=\"1\" rowspan=\"1\"><p><span>Purpose<\/span><\/p><\/td><td colspan=\"1\" rowspan=\"1\"><p><span>Build web servers and APIs with minimal abstraction<\/span><\/p><\/td><td colspan=\"1\" rowspan=\"1\"><p><span>Build structured backend applications and APIs<\/span><\/p><\/td><\/tr><tr><td colspan=\"1\" rowspan=\"1\"><p><span>Type of technology<\/span><\/p><\/td><td colspan=\"1\" rowspan=\"1\"><p><span>Web framework for Node.js<\/span><\/p><\/td><td colspan=\"1\" rowspan=\"1\"><p><span>Backend framework built on Node.js<\/span><\/p><\/td><\/tr><tr><td colspan=\"1\" rowspan=\"1\"><p><span>Architecture style<\/span><\/p><\/td><td colspan=\"1\" rowspan=\"1\"><p><span>Flexible and developer-defined<\/span><\/p><\/td><td colspan=\"1\" rowspan=\"1\"><p><span>Opinionated and modular<\/span><\/p><\/td><\/tr><tr><td colspan=\"1\" rowspan=\"1\"><p><span>Built-in features<\/span><\/p><\/td><td colspan=\"1\" rowspan=\"1\"><p><span>Routing and middleware support<\/span><\/p><\/td><td colspan=\"1\" rowspan=\"1\"><p><span>Modules, dependency injection, validation, decorators, and more<\/span><\/p><\/td><\/tr><tr><td colspan=\"1\" rowspan=\"1\"><p><span>TypeScript support<\/span><\/p><\/td><td colspan=\"1\" rowspan=\"1\"><p><span>Available through configuration<\/span><\/p><\/td><td colspan=\"1\" rowspan=\"1\"><p><span>Built into the framework<\/span><\/p><\/td><\/tr><tr><td colspan=\"1\" rowspan=\"1\"><p><span>Learning curve<\/span><\/p><\/td><td colspan=\"1\" rowspan=\"1\"><p><span>Lower<\/span><\/p><\/td><td colspan=\"1\" rowspan=\"1\"><p><span>Higher<\/span><\/p><\/td><\/tr><tr><td colspan=\"1\" rowspan=\"1\"><p><span>Scalability<\/span><\/p><\/td><td colspan=\"1\" rowspan=\"1\"><p><span>Depends on application architecture<\/span><\/p><\/td><td colspan=\"1\" rowspan=\"1\"><p><span>Designed around modular application growth<\/span><\/p><\/td><\/tr><tr><td colspan=\"1\" rowspan=\"1\"><p><span>Flexibility<\/span><\/p><\/td><td colspan=\"1\" rowspan=\"1\"><p><span>Very high<\/span><\/p><\/td><td colspan=\"1\" rowspan=\"1\"><p><span>More structured<\/span><\/p><\/td><\/tr><tr><td colspan=\"1\" rowspan=\"1\"><p><span>Project structure<\/span><\/p><\/td><td colspan=\"1\" rowspan=\"1\"><p><span>Defined by the developer<\/span><\/p><\/td><td colspan=\"1\" rowspan=\"1\"><p><span>Guided by framework conventions<\/span><\/p><\/td><\/tr><tr><td colspan=\"1\" rowspan=\"1\"><p><span>Best use cases<\/span><\/p><\/td><td colspan=\"1\" rowspan=\"1\"><p><span>Lightweight APIs, prototypes, small applications<\/span><\/p><\/td><td colspan=\"1\" rowspan=\"1\"><p><span>Large applications, microservices, long-term backend projects<\/span><\/p><\/td><\/tr><\/tbody><\/table><\/figure><h3 class=\"wp-block-heading\">NestJS vs. Node.js<\/h3><p>The main difference between Node.js and NestJS is that Node.js gives developers complete control over application architecture, while NestJS provides a predefined structure for building backend applications.<\/p><p>NestJS vs. Node.js compared side by side:<\/p><figure tabindex=\"0\" class=\"wp-block-table\"><table><tbody><tr><td colspan=\"1\" rowspan=\"1\"><p><strong>Feature<\/strong><\/p><\/td><td colspan=\"1\" rowspan=\"1\"><p><strong>Node.js<\/strong><\/p><\/td><td colspan=\"1\" rowspan=\"1\"><p><strong>NestJS<\/strong><\/p><\/td><\/tr><tr><td colspan=\"1\" rowspan=\"1\"><p><span>Purpose<\/span><\/p><\/td><td colspan=\"1\" rowspan=\"1\"><p><span>Execute JavaScript on the server<\/span><\/p><\/td><td colspan=\"1\" rowspan=\"1\"><p><span>Build structured backend applications and APIs<\/span><\/p><\/td><\/tr><tr><td colspan=\"1\" rowspan=\"1\"><p><span>Type of technology<\/span><\/p><\/td><td colspan=\"1\" rowspan=\"1\"><p><span>JavaScript runtime environment<\/span><\/p><\/td><td colspan=\"1\" rowspan=\"1\"><p><span>Backend framework<\/span><\/p><\/td><\/tr><tr><td colspan=\"1\" rowspan=\"1\"><p><span>Architecture style<\/span><\/p><\/td><td colspan=\"1\" rowspan=\"1\"><p><span>Defined by the developer<\/span><\/p><\/td><td colspan=\"1\" rowspan=\"1\"><p><span>Predefined and modular<\/span><\/p><\/td><\/tr><tr><td colspan=\"1\" rowspan=\"1\"><p><span>Built-in features<\/span><\/p><\/td><td colspan=\"1\" rowspan=\"1\"><p><span>Runtime APIs, networking, file system access, asynchronous I\/O<\/span><\/p><\/td><td colspan=\"1\" rowspan=\"1\"><p><span>Modules, dependency injection, validation, decorators, and more<\/span><\/p><\/td><\/tr><tr><td colspan=\"1\" rowspan=\"1\"><p><span>TypeScript support<\/span><\/p><\/td><td colspan=\"1\" rowspan=\"1\"><p><span>Supported through configuration<\/span><\/p><\/td><td colspan=\"1\" rowspan=\"1\"><p><span>Built into the framework<\/span><\/p><\/td><\/tr><tr><td colspan=\"1\" rowspan=\"1\"><p><span>Learning curve<\/span><\/p><\/td><td colspan=\"1\" rowspan=\"1\"><p><span>Lower<\/span><\/p><\/td><td colspan=\"1\" rowspan=\"1\"><p><span>Higher<\/span><\/p><\/td><\/tr><tr><td colspan=\"1\" rowspan=\"1\"><p><span>Scalability<\/span><\/p><\/td><td colspan=\"1\" rowspan=\"1\"><p><span>Depends on the chosen architecture<\/span><\/p><\/td><td colspan=\"1\" rowspan=\"1\"><p><span>Designed for modular application growth<\/span><\/p><\/td><\/tr><tr><td colspan=\"1\" rowspan=\"1\"><p><span>Flexibility<\/span><\/p><\/td><td colspan=\"1\" rowspan=\"1\"><p><span>Very high<\/span><\/p><\/td><td colspan=\"1\" rowspan=\"1\"><p><span>More structured<\/span><\/p><\/td><\/tr><tr><td colspan=\"1\" rowspan=\"1\"><p><span>Project structure<\/span><\/p><\/td><td colspan=\"1\" rowspan=\"1\"><p><span>Defined by the developer<\/span><\/p><\/td><td colspan=\"1\" rowspan=\"1\"><p><span>Guided by framework conventions<\/span><\/p><\/td><\/tr><tr><td colspan=\"1\" rowspan=\"1\"><p><span>Best use cases<\/span><\/p><\/td><td colspan=\"1\" rowspan=\"1\"><p><span>Custom backend systems, server-side applications, framework foundations<\/span><\/p><\/td><td colspan=\"1\" rowspan=\"1\"><p><span>APIs, microservices, and larger backend applications<\/span><\/p><\/td><\/tr><\/tbody><\/table><\/figure><h3 class=\"wp-block-heading\">NestJS vs. Next.js<\/h3><p>The main difference between NestJS and Next.js is the part of the application they are designed to handle. NestJS focuses on backend development, while <a href=\"\/tutorials\/what-is-nextjs\" data-wpel-link=\"internal\" rel=\"follow\">Next.js<\/a> focuses on frontend development and user interfaces.<\/p><p>NestJS vs. Next.js side-by-side table comparison:<\/p><figure tabindex=\"0\" class=\"wp-block-table\"><table><tbody><tr><td colspan=\"1\" rowspan=\"1\"><p><strong>Feature<\/strong><\/p><\/td><td colspan=\"1\" rowspan=\"1\"><p><strong>NestJS<\/strong><\/p><\/td><td colspan=\"1\" rowspan=\"1\"><p><strong>Next.js<\/strong><\/p><\/td><\/tr><tr><td colspan=\"1\" rowspan=\"1\"><p><span>Purpose<\/span><\/p><\/td><td colspan=\"1\" rowspan=\"1\"><p><span>Build backend applications and APIs<\/span><\/p><\/td><td colspan=\"1\" rowspan=\"1\"><p><span>Build frontend and full-stack web applications<\/span><\/p><\/td><\/tr><tr><td colspan=\"1\" rowspan=\"1\"><p><span>Type of technology<\/span><\/p><\/td><td colspan=\"1\" rowspan=\"1\"><p><span>Backend framework<\/span><\/p><\/td><td colspan=\"1\" rowspan=\"1\"><p><span>React framework<\/span><\/p><\/td><\/tr><tr><td colspan=\"1\" rowspan=\"1\"><p><span>Primary focus<\/span><\/p><\/td><td colspan=\"1\" rowspan=\"1\"><p><span>APIs, business logic, databases, authentication, and microservices<\/span><\/p><\/td><td colspan=\"1\" rowspan=\"1\"><p><span>User interfaces, routing, rendering, and frontend experiences<\/span><\/p><\/td><\/tr><tr><td colspan=\"1\" rowspan=\"1\"><p><span>Rendering support<\/span><\/p><\/td><td colspan=\"1\" rowspan=\"1\"><p><span>Not a rendering framework<\/span><\/p><\/td><td colspan=\"1\" rowspan=\"1\"><p><span>Server-side rendering, static generation, client-side rendering, and hybrid rendering<\/span><\/p><\/td><\/tr><tr><td colspan=\"1\" rowspan=\"1\"><p><span>Built-in features<\/span><\/p><\/td><td colspan=\"1\" rowspan=\"1\"><p><span>Modules, dependency injection, validation, decorators, and API tools<\/span><\/p><\/td><td colspan=\"1\" rowspan=\"1\"><p><span>File-based routing, React Server Components, API routes, and rendering tools<\/span><\/p><\/td><\/tr><tr><td colspan=\"1\" rowspan=\"1\"><p><span>TypeScript support<\/span><\/p><\/td><td colspan=\"1\" rowspan=\"1\"><p><span>Built into the framework<\/span><\/p><\/td><td colspan=\"1\" rowspan=\"1\"><p><span>Built into the framework<\/span><\/p><\/td><\/tr><tr><td colspan=\"1\" rowspan=\"1\"><p><span>Scalability<\/span><\/p><\/td><td colspan=\"1\" rowspan=\"1\"><p><span>Designed for large backend systems and microservices<\/span><\/p><\/td><td colspan=\"1\" rowspan=\"1\"><p><span>Designed for scalable frontend and full-stack applications<\/span><\/p><\/td><\/tr><tr><td colspan=\"1\" rowspan=\"1\"><p><span>Architecture style<\/span><\/p><\/td><td colspan=\"1\" rowspan=\"1\"><p><span>Structured and modular<\/span><\/p><\/td><td colspan=\"1\" rowspan=\"1\"><p><span>React-based application architecture<\/span><\/p><\/td><\/tr><tr><td colspan=\"1\" rowspan=\"1\"><p><span>SEO capabilities<\/span><\/p><\/td><td colspan=\"1\" rowspan=\"1\"><p><span>Not applicable<\/span><\/p><\/td><td colspan=\"1\" rowspan=\"1\"><p><span>Built-in support for SEO-friendly rendering<\/span><\/p><\/td><\/tr><tr><td colspan=\"1\" rowspan=\"1\"><p><span>Backend capabilities<\/span><\/p><\/td><td colspan=\"1\" rowspan=\"1\"><p><span>Core framework purpose<\/span><\/p><\/td><td colspan=\"1\" rowspan=\"1\"><p><span>Limited backend functionality for supporting frontend applications<\/span><\/p><\/td><\/tr><tr><td colspan=\"1\" rowspan=\"1\"><p><span>Frontend capabilities<\/span><\/p><\/td><td colspan=\"1\" rowspan=\"1\"><p><span>Not designed for frontend development<\/span><\/p><\/td><td colspan=\"1\" rowspan=\"1\"><p><span>Core framework purpose<\/span><\/p><\/td><\/tr><tr><td colspan=\"1\" rowspan=\"1\"><p><span>Best use cases<\/span><\/p><\/td><td colspan=\"1\" rowspan=\"1\"><p><span>APIs, microservices, SaaS backends, and enterprise applications<\/span><\/p><\/td><td colspan=\"1\" rowspan=\"1\"><p><span>Websites, web applications, ecommerce frontends, and full-stack React applications<\/span><\/p><\/td><\/tr><\/tbody><\/table><\/figure><h2 class=\"wp-block-heading\" id=\"h-what-are-nestjss-use-cases\">What are NestJS&rsquo;s use cases?<\/h2><p>NestJS is commonly used for backend systems that benefit from a structured application architecture. <\/p><p>The framework is a popular choice for:<\/p><ul class=\"wp-block-list\">\n<li><strong>REST APIs.<\/strong> NestJS is widely used for building APIs that expose data and functionality through HTTP endpoints.<\/li>\n\n\n\n<li><strong>SaaS platforms.<\/strong> Modular application design helps manage growing feature sets such as user accounts, subscriptions, billing, notifications, and reporting within a single backend system.<\/li>\n\n\n\n<li><strong>Ecommerce backends.<\/strong> NestJS can support product catalogs, authentication systems, shopping carts, payment processing, inventory management, and order fulfillment workflows.<\/li>\n\n\n\n<li><strong>Enterprise applications.<\/strong> Consistent architectural patterns help large development teams maintain shared coding standards across applications with multiple services, integrations, and business domains.<\/li>\n\n\n\n<li><strong>Real-time applications.<\/strong> Built-in WebSocket support allows applications to deliver live updates, notifications, chat functionality, and other event-driven features.<\/li>\n\n\n\n<li><strong>Microservices.<\/strong> NestJS includes tools for building distributed systems in which multiple services communicate via messaging systems, event streams, or network protocols.<\/li>\n<\/ul><h2 class=\"wp-block-heading\" id=\"h-what-are-the-limitations-of-nestjs\">What are the limitations of NestJS?<\/h2><p>Compared to smaller Node.js frameworks, NestJS introduces additional concepts, conventions, and framework layers that may not suit every project.<\/p><p>Its main limitations are:<\/p><ul class=\"wp-block-list\">\n<li><strong>Steeper learning curve.<\/strong> Developers need to understand modules, decorators, providers, dependency injection, and other NestJS-specific concepts before becoming productive with the framework.<\/li>\n\n\n\n<li><strong>More abstraction.<\/strong> NestJS adds architectural layers between application code and the underlying Node.js platform. Developers who prefer direct control over application structure may find those abstractions unnecessary.<\/li>\n\n\n\n<li><strong>Higher initial setup complexity.<\/strong> Building a NestJS application requires more planning and configuration than a minimal framework. Small projects may not need that level of structure.<\/li>\n\n\n\n<li><strong>TypeScript-heavy ecosystem.<\/strong> Although NestJS supports JavaScript, most documentation, examples, and community resources focus on TypeScript. Developers unfamiliar with TypeScript may need additional time to adapt.<\/li>\n\n\n\n<li><strong>Potential overengineering for simple applications.<\/strong> Lightweight APIs and small backend services may not benefit from modules, dependency injection, and other architectural patterns that NestJS encourages.<\/li>\n<\/ul><h2 class=\"wp-block-heading\" id=\"h-how-to-deploy-your-nestjs-application\">How to deploy your NestJS application<\/h2><p>NestJS applications can be deployed in several ways, including manual server deployments, Git-based deployments, and automated CI\/CD pipelines. <\/p><p>Regardless of the deployment method, the goal is the same: build the application, transfer the required files to a server, configure the environment, and start the application in production.<\/p><p>Before deploying, choose where you want to <a href=\"\/tutorials\/how-to-host-a-web-application\" data-wpel-link=\"internal\" rel=\"follow\">host your web application<\/a>. NestJS runs well on VPS platforms, cloud servers, and managed Node.js hosting environments. <\/p><p>Hostinger <a href=\"\/web-apps-hosting\/nestjs-hosting\" data-wpel-link=\"internal\" rel=\"follow\">VPS hosting<\/a> provides a production-ready environment for NestJS applications with Node.js support, GitHub integration, managed SSL certificates, automatic backups, and dedicated server resources.<\/p><p>A typical deployment workflow on Hostinger VPS hosting looks like this:<\/p><ol class=\"wp-block-list\">\n<li>Install the project dependencies using <code>npm install<\/code><\/li>\n\n\n\n<li>Build the application for production using <code>npm run build<\/code><\/li>\n\n\n\n<li>The build process compiles the application and generates production files inside the <code>dist\/<\/code> directory.<\/li>\n\n\n\n<li>Transfer the project files to the server or deploy directly from a Git repository.<\/li>\n\n\n\n<li>Configure environment variables, database connections, API keys, and other production application settings.<\/li>\n\n\n\n<li>Start the NestJS application with Node.js or a process manager such as PM2 to keep it running and simplify monitoring.<\/li>\n\n\n\n<li>Verify that the application, API endpoints, database connections, and environment variables work correctly after deployment.<\/li>\n<\/ol><figure class=\"wp-block-image size-large\"><a class=\"hgr-tutorials-cta hgr-tutorials-cta-vps-hosting\" href=\"\/vps-hosting\" target=\"_blank\" rel=\"noreferrer noopener\"><img decoding=\"async\" width=\"1024\" height=\"300\" src=\"https:\/\/imagedelivery.net\/LqiWLm-3MGbYHtFuUbcBtA\/wp-content\/uploads\/sites\/2\/2023\/02\/VPS-hosting-banner.png\/public\" alt=\"\" class=\"wp-image-77934\" srcset=\"https:\/\/imagedelivery.net\/LqiWLm-3MGbYHtFuUbcBtA\/wp-content\/uploads\/sites\/2\/2023\/02\/VPS-hosting-banner.png\/w=1024,fit=scale-down 1024w, https:\/\/imagedelivery.net\/LqiWLm-3MGbYHtFuUbcBtA\/wp-content\/uploads\/sites\/2\/2023\/02\/VPS-hosting-banner.png\/w=300,fit=scale-down 300w, https:\/\/imagedelivery.net\/LqiWLm-3MGbYHtFuUbcBtA\/wp-content\/uploads\/sites\/2\/2023\/02\/VPS-hosting-banner.png\/w=150,fit=scale-down 150w, https:\/\/imagedelivery.net\/LqiWLm-3MGbYHtFuUbcBtA\/wp-content\/uploads\/sites\/2\/2023\/02\/VPS-hosting-banner.png\/w=768,fit=scale-down 768w\" sizes=\"(max-width: 1024px) 100vw, 1024px\" \/><\/a><\/figure><p><\/p><p><\/p>\n","protected":false},"excerpt":{"rendered":"<p>NestJS is a TypeScript-first backend framework for building server-side applications with Node.js. Strong TypeScript support is one of its defining [&#8230;]<\/p>\n<p><a class=\"btn btn-secondary understrap-read-more-link\" href=\"\/tutorials\/what-is-nestjs\">Read More&#8230;<\/a><\/p>\n","protected":false},"author":530,"featured_media":150596,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"rank_math_title":"What is NestJS? How NestJS works and why it matters","rank_math_description":"Discover what NestJS is and how it works to build efficient, scalable Node.js backend applications with TypeScript.","rank_math_focus_keyword":"what is nestjs","footnotes":""},"categories":[22663,22651],"tags":[],"class_list":["post-150594","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-frameworks","category-web-app"],"hreflangs":[{"locale":"en-US","link":"https:\/\/www.hostinger.com\/tutorials\/what-is-nestjs\/","default":1},{"locale":"en-PH","link":"https:\/\/www.hostinger.com\/ph\/tutorials\/what-is-nestjs\/","default":0},{"locale":"en-MY","link":"https:\/\/www.hostinger.com\/my\/tutorials\/what-is-nestjs\/","default":0},{"locale":"en-UK","link":"https:\/\/www.hostinger.com\/uk\/tutorials\/what-is-nestjs\/","default":0},{"locale":"en-IN","link":"https:\/\/www.hostinger.com\/in\/tutorials\/what-is-nestjs\/","default":0},{"locale":"en-CA","link":"https:\/\/www.hostinger.com\/ca\/tutorials\/what-is-nestjs\/","default":0},{"locale":"en-AU","link":"https:\/\/www.hostinger.com\/au\/tutorials\/what-is-nestjs\/","default":0},{"locale":"en-NG","link":"https:\/\/www.hostinger.com\/ng\/tutorials\/what-is-nestjs\/","default":0}],"_links":{"self":[{"href":"https:\/\/www.hostinger.com\/tutorials\/wp-json\/wp\/v2\/posts\/150594","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.hostinger.com\/tutorials\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.hostinger.com\/tutorials\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.hostinger.com\/tutorials\/wp-json\/wp\/v2\/users\/530"}],"replies":[{"embeddable":true,"href":"https:\/\/www.hostinger.com\/tutorials\/wp-json\/wp\/v2\/comments?post=150594"}],"version-history":[{"count":6,"href":"https:\/\/www.hostinger.com\/tutorials\/wp-json\/wp\/v2\/posts\/150594\/revisions"}],"predecessor-version":[{"id":150605,"href":"https:\/\/www.hostinger.com\/tutorials\/wp-json\/wp\/v2\/posts\/150594\/revisions\/150605"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/www.hostinger.com\/tutorials\/wp-json\/wp\/v2\/media\/150596"}],"wp:attachment":[{"href":"https:\/\/www.hostinger.com\/tutorials\/wp-json\/wp\/v2\/media?parent=150594"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.hostinger.com\/tutorials\/wp-json\/wp\/v2\/categories?post=150594"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.hostinger.com\/tutorials\/wp-json\/wp\/v2\/tags?post=150594"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}