<?xml version="1.0" encoding="UTF-8"?><rss xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:atom="http://www.w3.org/2005/Atom" version="2.0" xmlns:cc="http://cyber.law.harvard.edu/rss/creativeCommonsRssModule.html">
    <channel>
        <title><![CDATA[Stories by Mehsara Khan on Medium]]></title>
        <description><![CDATA[Stories by Mehsara Khan on Medium]]></description>
        <link>https://medium.com/@mehsara.khan?source=rss-d5b659835180------2</link>
        <image>
            <url>https://cdn-images-1.medium.com/fit/c/150/150/0*w8wVvzIKiD8w77jK</url>
            <title>Stories by Mehsara Khan on Medium</title>
            <link>https://medium.com/@mehsara.khan?source=rss-d5b659835180------2</link>
        </image>
        <generator>Medium</generator>
        <lastBuildDate>Sun, 06 Dec 2026 17:11:18 GMT</lastBuildDate>
        <atom:link href="https://medium.com/@mehsara.khan/feed" rel="self" type="application/rss+xml"/>
        <webMaster><![CDATA[yourfriends@medium.com]]></webMaster>
        <atom:link href="http://medium.superfeedr.com/" rel="hub"/>
        <item>
            <title><![CDATA[ Getting Started with NestJS in 2025 — Build a Scalable Node.js Backend]]></title>
            <link>https://medium.com/@mehsara.khan/getting-started-with-nestjs-in-2025-build-a-scalable-node-js-backend-5bdf8492981c?source=rss-d5b659835180------2</link>
            <guid isPermaLink="false">https://medium.com/p/5bdf8492981c</guid>
            <category><![CDATA[nextjs-tutorial]]></category>
            <dc:creator><![CDATA[Mehsara Khan]]></dc:creator>
            <pubDate>Thu, 31 Jul 2025 11:28:04 GMT</pubDate>
            <atom:updated>2025-07-31T11:28:04.252Z</atom:updated>
            <content:encoded><![CDATA[<h3>🚀 Getting Started with NestJS in 2025 — Build a Scalable Node.js Backend</h3><p>Node.js has made backend development fast and flexible, but as projects grow, developers often struggle with <strong>maintainability</strong> and <strong>project structure</strong>. This is where <strong>NestJS</strong> comes in.</p><p>In this blog, I’ll walk you through:</p><ol><li><strong>What NestJS is and why it’s popular</strong></li><li><strong>How to create your first NestJS project</strong></li><li><strong>Building a simple API</strong></li><li><strong>Why NestJS is perfect for scalable projects</strong></li></ol><p>By the end, you’ll have a <strong>working backend API</strong> and a clear idea of how to structure your next Node.js project.</p><h3>1️⃣ What is NestJS?</h3><p><strong>NestJS</strong> is a <strong>progressive Node.js framework</strong> built with <strong>TypeScript</strong>.<br> It provides a <strong>structured, modular, and testable</strong> way to build backend applications.</p><p>Key features:</p><ul><li><strong>TypeScript by default</strong> → Less runtime errors</li><li><strong>Modular architecture</strong> → Clean separation of features</li><li><strong>Built on Express (or Fastify)</strong> → Familiar Node.js ecosystem</li><li><strong>Supports REST, GraphQL, WebSockets, and Microservices</strong></li></ul><p>In simple terms:</p><blockquote>NestJS gives your Node.js backend the organization of Angular and the flexibility of Express.</blockquote><h3>2️⃣ Setting Up a NestJS Project</h3><p>First, install the <strong>NestJS CLI</strong>:</p><pre>npm install -g @nestjs/cli</pre><p>Create a new project:</p><pre>nest new my-nest-app</pre><p>Select <strong>npm</strong> or <strong>yarn</strong> when prompted.<br> Once installed, run the project:</p><pre>cd my-nest-app<br>npm run start:dev</pre><p>Visit <a href="http://localhost:3000/"><strong>http://localhost:3000</strong></a> and you should see:</p><pre>Hello World!</pre><p>🎉 Congratulations, you have a NestJS project running!</p><h3>3️⃣ Understanding NestJS Structure</h3><p>A typical NestJS project looks like this:</p><pre>src/<br>│<br>├── app.controller.ts   # Handles incoming requests<br>├── app.service.ts      # Business logic (used by controller)<br>├── app.module.ts       # Groups controllers &amp; services<br>└── main.ts             # Application entry point</pre><ul><li><strong>Controller</strong> → Defines routes and handles HTTP requests</li><li><strong>Service</strong> → Contains logic and reusable functions</li><li><strong>Module</strong> → Groups related controllers and services</li></ul><h3>4️⃣ Building Your First API</h3><p>Let’s create a <strong>Projects API</strong> to showcase a portfolio.</p><h3>Step 1: Generate a Controller</h3><pre>nest g controller projects</pre><p>Edit src/projects/projects.controller.ts:</p><pre>import { Controller, Get } from &#39;@nestjs/common&#39;;</pre><pre>@Controller(&#39;projects&#39;)<br>export class ProjectsController {<br>  @Get()<br>  getProjects() {<br>    return [<br>      { id: 1, title: &#39;Real Estate Insights&#39;, description: &#39;Analytics dashboard for property trends&#39; },<br>      { id: 2, title: &#39;Locality Reviews&#39;, description: &#39;NLP-powered sentiment insights for users&#39; },<br>    ];<br>  }<br>}</pre><h3>Step 2: Generate a Module</h3><pre>nest g module projects</pre><p>Nest automatically links it to your app module.</p><p>Now run the server:</p><pre>npm run start:dev</pre><p>Visit:</p><pre>http://localhost:3000/projects</pre><p>You’ll see:</p><pre>[<br>  {<br>    &quot;id&quot;: 1,<br>    &quot;title&quot;: &quot;Real Estate Insights&quot;,<br>    &quot;description&quot;: &quot;Analytics dashboard for property trends&quot;<br>  },<br>  {<br>    &quot;id&quot;: 2,<br>    &quot;title&quot;: &quot;Locality Reviews&quot;,<br>    &quot;description&quot;: &quot;NLP-powered sentiment insights for users&quot;<br>  }<br>]</pre><p>🎉 You just built your first <strong>NestJS API endpoint</strong>.</p><h3>5️⃣ Why NestJS is Perfect for Scalable Backends</h3><ul><li><strong>Organized structure</strong> → Easy to manage even in large teams</li><li><strong>TypeScript support</strong> → Reduces runtime errors and improves maintainability</li><li><strong>Supports microservices &amp; GraphQL</strong> → Future-proof architecture</li><li><strong>Dependency Injection (DI)</strong> → Simplifies testing and reusability</li><li><strong>Active community</strong> → Regular updates and strong ecosystem</li></ul><p>If you’re building <strong>SaaS, dashboards, microservices, or APIs</strong>, NestJS will save you time and headaches.</p><h3>🎯 Final Thoughts</h3><p>NestJS is <strong>more than just another Node.js framework</strong>.<br> It gives you <strong>structure, scalability, and modern TypeScript support</strong> without sacrificing performance.</p><p>If you’re looking to:</p><ul><li>Build <strong>clean, production-ready APIs</strong></li><li>Improve <strong>project maintainability</strong></li><li>Prepare for <strong>enterprise-grade applications</strong></li></ul><p>…then NestJS should be on your learning list in <strong>2025</strong>.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=5bdf8492981c" width="1" height="1" alt="">]]></content:encoded>
        </item>
    </channel>
</rss>