<?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 Hiruni Malshika on Medium]]></title>
        <description><![CDATA[Stories by Hiruni Malshika on Medium]]></description>
        <link>https://medium.com/@malshikahiruni1999?source=rss-b176c2ab539b------2</link>
        <image>
            <url>https://cdn-images-1.medium.com/fit/c/150/150/0*6dpWC40SD3iI-5nQ</url>
            <title>Stories by Hiruni Malshika on Medium</title>
            <link>https://medium.com/@malshikahiruni1999?source=rss-b176c2ab539b------2</link>
        </image>
        <generator>Medium</generator>
        <lastBuildDate>Fri, 20 Nov 2026 22:56:42 GMT</lastBuildDate>
        <atom:link href="https://medium.com/@malshikahiruni1999/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[Deploying App GitHub Actions, GitHub Container Registry, and a VM]]></title>
            <description><![CDATA[<div class="medium-feed-item"><p class="medium-feed-image"><a href="https://medium.com/@malshikahiruni1999/deploying-node-js-097ad3c3e424?source=rss-b176c2ab539b------2"><img src="https://cdn-images-1.medium.com/max/1536/1*uhhnuDkMeXPSqG_uBHT9Bg.png" width="1536"></a></p><p class="medium-feed-snippet">In this article, I&#x2019;ll walk you through the end-to-end process of building, containerizing, and deploying a Node.js backend and a Vite&#x2026;</p><p class="medium-feed-link"><a href="https://medium.com/@malshikahiruni1999/deploying-node-js-097ad3c3e424?source=rss-b176c2ab539b------2">Continue reading on Medium »</a></p></div>]]></description>
            <link>https://medium.com/@malshikahiruni1999/deploying-node-js-097ad3c3e424?source=rss-b176c2ab539b------2</link>
            <guid isPermaLink="false">https://medium.com/p/097ad3c3e424</guid>
            <dc:creator><![CDATA[Hiruni Malshika]]></dc:creator>
            <pubDate>Wed, 14 Jan 2026 10:35:15 GMT</pubDate>
            <atom:updated>2026-01-14T10:50:20.920Z</atom:updated>
        </item>
        <item>
            <title><![CDATA[Azure Web Apps vs Kubernetes: The Correct Deployment Platform]]></title>
            <description><![CDATA[<div class="medium-feed-item"><p class="medium-feed-image"><a href="https://medium.com/@malshikahiruni1999/azure-web-apps-vs-kubernetes-the-correct-deployment-platform-03aec553cc3d?source=rss-b176c2ab539b------2"><img src="https://cdn-images-1.medium.com/max/1104/1*kede51MrTTiBT5EecGp5KA.jpeg" width="1104"></a></p><p class="medium-feed-snippet">Introduction</p><p class="medium-feed-link"><a href="https://medium.com/@malshikahiruni1999/azure-web-apps-vs-kubernetes-the-correct-deployment-platform-03aec553cc3d?source=rss-b176c2ab539b------2">Continue reading on Medium »</a></p></div>]]></description>
            <link>https://medium.com/@malshikahiruni1999/azure-web-apps-vs-kubernetes-the-correct-deployment-platform-03aec553cc3d?source=rss-b176c2ab539b------2</link>
            <guid isPermaLink="false">https://medium.com/p/03aec553cc3d</guid>
            <dc:creator><![CDATA[Hiruni Malshika]]></dc:creator>
            <pubDate>Mon, 13 Oct 2025 05:16:23 GMT</pubDate>
            <atom:updated>2025-10-13T05:16:23.106Z</atom:updated>
        </item>
        <item>
            <title><![CDATA[Implementing a Robust Microservices Architecture with Azure Kubernetes Service]]></title>
            <description><![CDATA[<div class="medium-feed-item"><p class="medium-feed-image"><a href="https://medium.com/@malshikahiruni1999/implementing-a-robust-microservices-architecture-with-azure-kubernetes-service-f130e5111d8d?source=rss-b176c2ab539b------2"><img src="https://cdn-images-1.medium.com/max/1198/1*F78bjpdgt6stVUUfvp_MNQ.png" width="1198"></a></p><p class="medium-feed-snippet">For developers and IT professionals looking to expand their cloud skills, Azure Kubernetes Service (AKS) offers a powerful platform for&#x2026;</p><p class="medium-feed-link"><a href="https://medium.com/@malshikahiruni1999/implementing-a-robust-microservices-architecture-with-azure-kubernetes-service-f130e5111d8d?source=rss-b176c2ab539b------2">Continue reading on Medium »</a></p></div>]]></description>
            <link>https://medium.com/@malshikahiruni1999/implementing-a-robust-microservices-architecture-with-azure-kubernetes-service-f130e5111d8d?source=rss-b176c2ab539b------2</link>
            <guid isPermaLink="false">https://medium.com/p/f130e5111d8d</guid>
            <dc:creator><![CDATA[Hiruni Malshika]]></dc:creator>
            <pubDate>Sun, 20 Apr 2025 09:05:24 GMT</pubDate>
            <atom:updated>2025-04-20T09:07:26.704Z</atom:updated>
        </item>
        <item>
            <title><![CDATA[Mindfulness Meets Organization: Tools and Techniques for a Balanced Life]]></title>
            <description><![CDATA[<div class="medium-feed-item"><p class="medium-feed-image"><a href="https://medium.com/@malshikahiruni1999/mindfulness-meets-organization-tools-and-techniques-for-a-balanced-life-7d9e1bfb46e8?source=rss-b176c2ab539b------2"><img src="https://cdn-images-1.medium.com/max/1000/1*5Dg2eke41CHsXkl_5L0OQg.png" width="1000"></a></p><p class="medium-feed-snippet">In our fast-paced world, finding a balance between mindfulness and productivity often feels like walking a tightrope.</p><p class="medium-feed-link"><a href="https://medium.com/@malshikahiruni1999/mindfulness-meets-organization-tools-and-techniques-for-a-balanced-life-7d9e1bfb46e8?source=rss-b176c2ab539b------2">Continue reading on Medium »</a></p></div>]]></description>
            <link>https://medium.com/@malshikahiruni1999/mindfulness-meets-organization-tools-and-techniques-for-a-balanced-life-7d9e1bfb46e8?source=rss-b176c2ab539b------2</link>
            <guid isPermaLink="false">https://medium.com/p/7d9e1bfb46e8</guid>
            <category><![CDATA[balanced-life]]></category>
            <category><![CDATA[stress-management]]></category>
            <category><![CDATA[motivation]]></category>
            <category><![CDATA[organization]]></category>
            <dc:creator><![CDATA[Hiruni Malshika]]></dc:creator>
            <pubDate>Sun, 24 Nov 2024 09:25:34 GMT</pubDate>
            <atom:updated>2024-11-24T09:25:34.975Z</atom:updated>
        </item>
        <item>
            <title><![CDATA[How to Stay Calm and Productive During High-Pressure Deadlines]]></title>
            <description><![CDATA[<div class="medium-feed-item"><p class="medium-feed-image"><a href="https://medium.com/@malshikahiruni1999/how-to-stay-calm-and-productive-during-high-pressure-deadlines-456d7b03f3c2?source=rss-b176c2ab539b------2"><img src="https://cdn-images-1.medium.com/max/1920/1*_X0equp9BEytbOJ8hPPC0g.png" width="1920"></a></p><p class="medium-feed-snippet">In today&#x2019;s fast-paced work environment, handling a heavy workload has become a norm for many professionals.</p><p class="medium-feed-link"><a href="https://medium.com/@malshikahiruni1999/how-to-stay-calm-and-productive-during-high-pressure-deadlines-456d7b03f3c2?source=rss-b176c2ab539b------2">Continue reading on Medium »</a></p></div>]]></description>
            <link>https://medium.com/@malshikahiruni1999/how-to-stay-calm-and-productive-during-high-pressure-deadlines-456d7b03f3c2?source=rss-b176c2ab539b------2</link>
            <guid isPermaLink="false">https://medium.com/p/456d7b03f3c2</guid>
            <dc:creator><![CDATA[Hiruni Malshika]]></dc:creator>
            <pubDate>Thu, 24 Oct 2024 11:18:56 GMT</pubDate>
            <atom:updated>2024-10-24T11:18:56.820Z</atom:updated>
        </item>
        <item>
            <title><![CDATA[Can Positive Vibes Change Your Life?]]></title>
            <description><![CDATA[<div class="medium-feed-item"><p class="medium-feed-image"><a href="https://medium.com/@malshikahiruni1999/can-positive-vibes-change-your-life-10f7d2afe6cd?source=rss-b176c2ab539b------2"><img src="https://cdn-images-1.medium.com/max/1920/1*RIGV_gh9PQpjZBKGIVpq3g.png" width="1920"></a></p><p class="medium-feed-snippet">In the digital everyday, we come across lots of problems, negative events and increased unpredictability. However, people often ignore the&#x2026;</p><p class="medium-feed-link"><a href="https://medium.com/@malshikahiruni1999/can-positive-vibes-change-your-life-10f7d2afe6cd?source=rss-b176c2ab539b------2">Continue reading on Medium »</a></p></div>]]></description>
            <link>https://medium.com/@malshikahiruni1999/can-positive-vibes-change-your-life-10f7d2afe6cd?source=rss-b176c2ab539b------2</link>
            <guid isPermaLink="false">https://medium.com/p/10f7d2afe6cd</guid>
            <category><![CDATA[mindset]]></category>
            <category><![CDATA[positive-thinking]]></category>
            <category><![CDATA[positive-psychology]]></category>
            <category><![CDATA[mindfulness]]></category>
            <dc:creator><![CDATA[Hiruni Malshika]]></dc:creator>
            <pubDate>Thu, 17 Oct 2024 18:55:53 GMT</pubDate>
            <atom:updated>2024-10-17T18:55:53.791Z</atom:updated>
        </item>
        <item>
            <title><![CDATA[Containerizing a React Application with Docker]]></title>
            <description><![CDATA[<div class="medium-feed-item"><p class="medium-feed-image"><a href="https://medium.com/@malshikahiruni1999/containerizing-a-react-application-with-docker-7ac375ba7118?source=rss-b176c2ab539b------2"><img src="https://cdn-images-1.medium.com/max/2000/1*uvTVOxlCs-CDhkbWUH92BA.png" width="2000"></a></p><p class="medium-feed-snippet">This guide focuses on setting up a React application within a Docker container. By leveraging Docker, developers can create a consistent&#x2026;</p><p class="medium-feed-link"><a href="https://medium.com/@malshikahiruni1999/containerizing-a-react-application-with-docker-7ac375ba7118?source=rss-b176c2ab539b------2">Continue reading on Medium »</a></p></div>]]></description>
            <link>https://medium.com/@malshikahiruni1999/containerizing-a-react-application-with-docker-7ac375ba7118?source=rss-b176c2ab539b------2</link>
            <guid isPermaLink="false">https://medium.com/p/7ac375ba7118</guid>
            <category><![CDATA[containers]]></category>
            <category><![CDATA[dockerfiles]]></category>
            <category><![CDATA[container-orchestration]]></category>
            <category><![CDATA[docker]]></category>
            <category><![CDATA[docker-image]]></category>
            <dc:creator><![CDATA[Hiruni Malshika]]></dc:creator>
            <pubDate>Mon, 23 Sep 2024 03:32:11 GMT</pubDate>
            <atom:updated>2024-09-23T03:32:11.608Z</atom:updated>
        </item>
        <item>
            <title><![CDATA[Comprehensive Guide to Azure Virtual Machines: Creation, Configuration, and Connection]]></title>
            <description><![CDATA[<div class="medium-feed-item"><p class="medium-feed-image"><a href="https://medium.com/@malshikahiruni1999/comprehensive-guide-to-azure-virtual-machines-creation-configuration-and-connection-42f044e50241?source=rss-b176c2ab539b------2"><img src="https://cdn-images-1.medium.com/max/2000/1*IHc75ycEDcULRWY8QxBmTw.png" width="2000"></a></p><p class="medium-feed-snippet">How virtual machines create on azure?</p><p class="medium-feed-link"><a href="https://medium.com/@malshikahiruni1999/comprehensive-guide-to-azure-virtual-machines-creation-configuration-and-connection-42f044e50241?source=rss-b176c2ab539b------2">Continue reading on Medium »</a></p></div>]]></description>
            <link>https://medium.com/@malshikahiruni1999/comprehensive-guide-to-azure-virtual-machines-creation-configuration-and-connection-42f044e50241?source=rss-b176c2ab539b------2</link>
            <guid isPermaLink="false">https://medium.com/p/42f044e50241</guid>
            <category><![CDATA[cloud-computing]]></category>
            <category><![CDATA[virtual-machine]]></category>
            <category><![CDATA[azure-resource]]></category>
            <category><![CDATA[iaas]]></category>
            <dc:creator><![CDATA[Hiruni Malshika]]></dc:creator>
            <pubDate>Wed, 04 Sep 2024 20:01:40 GMT</pubDate>
            <atom:updated>2024-09-05T10:20:14.169Z</atom:updated>
        </item>
        <item>
            <title><![CDATA[A Beginner’s Guide to Containerizing Simple Applications]]></title>
            <description><![CDATA[<div class="medium-feed-item"><p class="medium-feed-image"><a href="https://medium.com/@malshikahiruni1999/a-beginners-guide-to-containerizing-simple-applications-0679e127281b?source=rss-b176c2ab539b------2"><img src="https://cdn-images-1.medium.com/max/2000/1*hE5RB4LoTTDl0p2S7r7R-Q.png" width="2000"></a></p><p class="medium-feed-snippet">Docker Usage</p><p class="medium-feed-link"><a href="https://medium.com/@malshikahiruni1999/a-beginners-guide-to-containerizing-simple-applications-0679e127281b?source=rss-b176c2ab539b------2">Continue reading on Medium »</a></p></div>]]></description>
            <link>https://medium.com/@malshikahiruni1999/a-beginners-guide-to-containerizing-simple-applications-0679e127281b?source=rss-b176c2ab539b------2</link>
            <guid isPermaLink="false">https://medium.com/p/0679e127281b</guid>
            <dc:creator><![CDATA[Hiruni Malshika]]></dc:creator>
            <pubDate>Wed, 28 Aug 2024 20:20:41 GMT</pubDate>
            <atom:updated>2024-08-29T03:31:37.328Z</atom:updated>
        </item>
        <item>
            <title><![CDATA[Mastering NestJS: Harnessing the Power of Validations and Middleware Functions]]></title>
            <link>https://medium.com/@malshikahiruni1999/mastering-nestjs-harnessing-the-power-of-validations-and-middleware-functions-4f68d23df662?source=rss-b176c2ab539b------2</link>
            <guid isPermaLink="false">https://medium.com/p/4f68d23df662</guid>
            <category><![CDATA[nestjs]]></category>
            <category><![CDATA[validation]]></category>
            <category><![CDATA[nestjs-tutorial]]></category>
            <category><![CDATA[middleware-nextjs]]></category>
            <category><![CDATA[nest]]></category>
            <dc:creator><![CDATA[Hiruni Malshika]]></dc:creator>
            <pubDate>Fri, 21 Jun 2024 19:44:51 GMT</pubDate>
            <atom:updated>2024-06-26T05:24:38.999Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*OTEozYibRhboJK_tnG4VTw.png" /></figure><h3>Validations</h3><p>When building a web application, it’s important to ensure that any data sent to the application is correct. NestJS makes this easy by providing several tools, called “pipes,” that automatically validate incoming requests.</p><p>The <strong>ValidationPipe</strong> uses a powerful package called<strong> class-validator</strong>. This package allows you to easily set up validation rules using simple tags in your code. The ValidationPipe then ensures that all incoming data follows these rules. You can declare these rules in your class or Data Transfer Object (DTO) files within each module of your application.</p><p>In this article, we will demonstrate how to use the ValidationPipe method in DTO files. First, we need to install <strong>class-validator</strong> and <strong>class-transformer</strong>.</p><pre>npm install class-validator class-transformer</pre><p>To declare validation, we need to create a DTO class. First, create a folder called `dto` under the `recipe` folder. Then, create a file named `create-recipe-dto.ts`.</p><pre>import { IsArray, IsDateString, IsMilitaryTime, IsNotEmpty, IsString } from &quot;class-validator&quot;;<br><br>export class CreateRecipeDTO {<br>    @IsString()<br>    @IsNotEmpty()<br>    readonly title: string;<br><br><br>    @IsNotEmpty()<br>    @IsArray()<br>    readonly ingredients: string[];<br><br>    @IsNotEmpty()<br>    @IsDateString()<br>    readonly madeDate: Date;<br><br>    @IsMilitaryTime()<br>    @IsNotEmpty()<br>    readonly recipemakingtime: Date;<br>}<br></pre><p>Next, define this DTO in the recipe controller. Since we are validating the create recipe method, add the DTO in the POST method.</p><pre>import { Controller, Delete, Get, Post, Put, Body } from &#39;@nestjs/common&#39;;<br>import { RecipeService } from &#39;./recipe.service&#39;;<br>import { CreateRecipeDTO } from &#39;./dto/create-recipe-dto&#39;;<br>@Controller(&#39;recipe&#39;)<br>export class RecipeController {<br><br>    constructor(private recipeService: RecipeService) {}<br><br>    @Post()<br>    create(@Body() CreateRecipeDTO: CreateRecipeDTO){<br>        return this.recipeService.create(CreateRecipeDTO)<br>    }<br><br><br>  // Other methods<br>}</pre><p>You can use the validation file in any method within a specific controller. Now, I have applied this validation globally for all controllers.</p><p>To do this, go to the `main.ts` file, import `ValidationPipe` from the `<a href="http://twitter.com/nestjs/common">@nestjs/common</a>` package, and use the `useGlobalPipes()` method.</p><pre>import { NestFactory } from &#39;@nestjs/core&#39;;<br>import { AppModule } from &#39;./app.module&#39;;<br>import { ValidationPipe } from &#39;@nestjs/common&#39;;<br><br>async function bootstrap() {<br>  const app = await NestFactory.create(AppModule);<br>  app.useGlobalPipes(new ValidationPipe())<br>  await app.listen(3000);<br>}<br>bootstrap();<br><br></pre><p>Check if these validations are working by executing a POST request for a recipe. Create a .http file and test whether the validations are functioning correctly. In the following example, I&#39;ve added the madeDate with the wrong format.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*h7oeyn2-Yg6S7tLUxaBOPw.png" /></figure><p>You can test the functionality by inputting incorrect data types for various attributes. The screenshot below shows the correct object data that you want to create without encountering any validation errors.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*eInX0H53sg8-P3w8Xz9eMg.png" /></figure><h3>Middleware Functions</h3><p>Middleware functions run before executing the route handler in NestJS. If you need to perform any actions before the route handler executes, you can write your code inside the middleware. For example, if you want to execute a method before creating a recipe, you can call that method within the middleware. Middleware functions have access to the request, response, and next() functions, allowing them to customize request objects. This means you can add headers or log the request time, for instance.</p><p>When sending requests between a browser and server, you can create logger middleware to log the requested message or data before it reaches the route handler.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/633/1*oYDZe-Ygb6KuMnzY5Yy_Sg.png" /></figure><p>Here is the base middleware class:</p><pre>use(req: any, res: any, next: () =&gt; void) {<br>    next();<br>}</pre><p>Middleware functions in NestJS can perform various tasks, including:</p><ul><li>Executing any code</li><li>Modifying the request and response objects</li><li>Ending the request and response cycle</li><li>Calling the next middleware function in the stack</li></ul><p>Create a directory called “common” and then create another directory called “middleware” inside the “common” directory.</p><p>To test the middleware, you can create a logger file using the following command. By specifying the dry run option, you can generate a report without actually writing the files:</p><pre>nest g mi common/middleware/logger --no-spec --no-flat --dry-run</pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/777/1*dsZPEe343R9tSt3yf6Xtmg.png" /></figure><p>No-spec: Generates a command without creating a test file. ‘</p><p>No-flat: Generates a command without creating a directory.</p><p>Now, we can create the actual file using this command.</p><pre>nest g mi common/middleware/logger --no-spec --no-flat</pre><p>We’ve just created the middleware logger file in the ‘common/middleware’ directory within the source. It includes a ‘use’ method with three arguments, allowing you to customize the request object. Add a ‘console.log’ statement within the middleware function to test its functionality before processing each request.</p><pre>import { Injectable, NestMiddleware } from &#39;@nestjs/common&#39;;<br><br>@Injectable()<br>export class LoggerMiddleware implements NestMiddleware {<br>  use(req: any, res: any, next: () =&gt; void) {<br>    console.log(&#39;Middleware working ....&#39;, new Date().toDateString())<br>    next();<br>  }<br>}</pre><p>To apply the middleware, navigate to `app.module.ts` and implement this middleware.</p><pre>import { MiddlewareConsumer, Module, NestModule } from &#39;@nestjs/common&#39;;<br>import { AppController } from &#39;./app.controller&#39;;<br>import { AppService } from &#39;./app.service&#39;;<br>import { RecipeModule } from &#39;./recipe/recipe.module&#39;;<br>import { LoggerMiddleware } from &#39;./common/middleware/logger/logger.middleware&#39;;<br><br>@Module({<br>  imports: [RecipeModule],<br>  controllers: [AppController],<br>  providers: [AppService],<br>})<br>export class AppModule implements NestModule{<br>  configure(consumer: MiddlewareConsumer) {<br>    consumer.apply(LoggerMiddleware)<br>    .forRoutes(&#39;recipe&#39;)<br>  }<br>}</pre><p>Then, run the NestJS project to verify whether this middleware method is functioning correctly.</p><pre>npm run start:dev</pre><p>Run and test this function by using the .http file. After sending the request to create new recipes, you will see the request log in the console.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/879/1*XibWTJlmlScIuuntSrJ-Zw.png" /></figure><p>There are two other options to implement logger middleware. The second option is to change consumer.apply() as shown in app.module.ts.</p><pre>...// Rest Code<br>export class AppModule implements NestModule {<br> configure(consumer: MiddlewareConsumer) {<br>    consumer.apply(LoggerMiddleware).forRoutes({path: &#39;recipe&#39;, method: RequestMethod.POST})//option 2<br>  }<br>}</pre><p>Another option is to assign a controller in a middleware function. With this approach, we can apply a logger middleware to all methods within the controller.</p><pre>//Rest Code<br>export class AppModule implements NestModule {<br>  configure(consumer: MiddlewareConsumer) {<br>    consumer.apply(LoggerMiddleware).forRoutes(RecipeController);<br>  }<br>}</pre><p>By reading this article, you will gain a basic understanding of the usage of validations and middlewares in NestJS. Happy learning and coding!</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=4f68d23df662" width="1" height="1" alt="">]]></content:encoded>
        </item>
    </channel>
</rss>