<?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 Lomana Loma on Medium]]></title>
        <description><![CDATA[Stories by Lomana Loma on Medium]]></description>
        <link>https://medium.com/@lomana?source=rss-1390fd7c017c------2</link>
        <image>
            <url>https://cdn-images-1.medium.com/fit/c/150/150/1*cbfJRUkxMpk-1kqsZhPgTQ.png</url>
            <title>Stories by Lomana Loma on Medium</title>
            <link>https://medium.com/@lomana?source=rss-1390fd7c017c------2</link>
        </image>
        <generator>Medium</generator>
        <lastBuildDate>Mon, 23 Nov 2026 08:57:32 GMT</lastBuildDate>
        <atom:link href="https://medium.com/@lomana/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[Microservices with Camunda in Java]]></title>
            <link>https://lomana.medium.com/microservices-with-camunda-in-java-7b050aad248d?source=rss-1390fd7c017c------2</link>
            <guid isPermaLink="false">https://medium.com/p/7b050aad248d</guid>
            <category><![CDATA[bpmn]]></category>
            <category><![CDATA[camunda]]></category>
            <category><![CDATA[camunda8]]></category>
            <category><![CDATA[camunda-bpmn]]></category>
            <category><![CDATA[microservices]]></category>
            <dc:creator><![CDATA[Lomana Loma]]></dc:creator>
            <pubDate>Fri, 09 Jan 2026 03:16:54 GMT</pubDate>
            <atom:updated>2026-01-10T09:15:59.553Z</atom:updated>
            <content:encoded><![CDATA[<p>How to handle multiple services connection and workflow per each service via Camunda in Java</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*OxV5lc5Mh3OpUlVbFzc23g.png" /></figure><p>This example will use full configuration docker-compose-full.yaml and Camunda Desktop</p><h3><strong>Prerequisites</strong></h3><ul><li>Java (JDK21)</li><li>3 Java projects (orchestration, micro-1, micro-2)</li><li><a href="https://camunda.com/download/modeler/">Camunda Desktop</a></li><li><a href="https://www.docker.com/products/docker-desktop/">Docker Desktop</a></li></ul><h3>Clone Camunda project</h3><ul><li>Click this link <a href="https://github.com/camunda/camunda-distributions/tree/main">GitHub — camunda-distributions</a></li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/348/1*pp6K5s9stHwW7ItC2FAPSw.png" /></figure><h4>Run docker compose</h4><ul><li>Go to docker-compose\versions\camunda-8.8</li><li>Open CMD and run this command docker compose -f docker-compose-full.yaml up</li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*YMvQz6SG3GDWqOB-r4Qzpw.png" /></figure><h3>Prepare BPMN for Camunda</h3><p>Download Camunda Desktop</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*5DFis_xyEFgEVDicNFpjjw.png" /></figure><p>Create BPMN diagram</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*nH2k8oZ32mkFtOQi_RkvYA.png" /></figure><p>Create service tasks</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*ESnHwxrIDDmNZprSLxUMQw.png" /></figure><p>Open properties panel Window &gt; Toggle Properties Panel</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/348/1*1GswQlWfrVTKzcTK18oTkQ.png" /></figure><p>Define job type for service task to bind a job type with the service</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*yUCGPYR9MDO0d6-b0eXYPQ.png" /></figure><p>Deploy BPMN into Operate server</p><ul><li><strong>Target</strong>: Camunda 8 Self-Managed</li><li><strong>Cluster URL</strong>: <a href="http://localhost:26500/">http://localhost:26500</a></li><li><strong>Authentication</strong>: OAuth</li><li><strong>OAuth URL</strong>: <a href="http://localhost:18080/auth/realms/camunda-platform/protocol/openid-connect/token">http://localhost:18080/auth/realms/camunda-platform/protocol/openid-connect/token</a></li><li><strong>Client ID</strong>: orchestration (from .env file: ORCHESTRATION_CLIENT_ID)</li><li><strong>Client Secret</strong>: secret (from .env file: ORCHESTRATION_CLIENT_SECRET)</li><li><strong>Audience</strong>: orchestration-api</li></ul><p>Click Deploy BPMN</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/486/1*oMBncM4wyLMM90LOGskNRQ.png" /></figure><h4>Verify deployed BPMN workflow in operate</h4><p>Go to <a href="http://localhost:8088/operate">Operate: Dashboard</a></p><ul><li>Username: demo</li><li>Password: demo</li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*3RWj2xa2xWyLKoDoASYfdQ.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*m5iLFSSda3_FFNujzedDYA.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*7-E89CxPm55bla30aMyEiQ.png" /></figure><h3>Create Java services</h3><ul><li>Create orchestration service to handle multiple services</li><li>Create micro-1 1st service to receive message from orchestration from Camunda workflow “<strong>Create product 1</strong>” job type: create-product-1</li><li>Create micro-2 2nd service to receive message from orchestration from Camunda workflow “<strong>Create product 2</strong>” job type: create-product-2</li></ul><h4>Orchestration service</h4><p>Add dependency camunda-spring-boot-starter in pom.xml</p><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/30f76b514f3b1b978a4db00e1c71ca24/href">https://medium.com/media/30f76b514f3b1b978a4db00e1c71ca24/href</a></iframe><p>Add create-product-workflow.bpmn in src/resources</p><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/3d16a7573714cf93a4d8ef72ce271fcd/href">https://medium.com/media/3d16a7573714cf93a4d8ef72ce271fcd/href</a></iframe><p>Add camunda configuration in application.yaml</p><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/930c9b661bbd3ca1c53475f7e3a1beac/href">https://medium.com/media/930c9b661bbd3ca1c53475f7e3a1beac/href</a></iframe><p>Add @Deployment(resources = &quot;classpath:create-product-workflow.bpmn&quot;) on OrchestrationApplication.java</p><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/7e191262d7a7d75829993a5cc731f54c/href">https://medium.com/media/7e191262d7a7d75829993a5cc731f54c/href</a></iframe><p>Create OrchestrationService.java</p><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/2ae89aa598f9bfd497a9e08da258d7fc/href">https://medium.com/media/2ae89aa598f9bfd497a9e08da258d7fc/href</a></iframe><p>Create OrchestrationController.java</p><ul><li>BPMN file name: create-product-workflow.bpmn</li><li>Process ID: Process_0byx5zj this process ID from Camunda process</li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*lmI7swQwYF6K3JkGthzZqg.png" /></figure><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/d2b30cb3ecab6f94ec8b5a9374b6a314/href">https://medium.com/media/d2b30cb3ecab6f94ec8b5a9374b6a314/href</a></iframe><h4>Micro-1 service</h4><p>Add dependency camunda-spring-boot-starter in pom.xml</p><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/30f76b514f3b1b978a4db00e1c71ca24/href">https://medium.com/media/30f76b514f3b1b978a4db00e1c71ca24/href</a></iframe><p>Add camunda configuration in application.yaml</p><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/930c9b661bbd3ca1c53475f7e3a1beac/href">https://medium.com/media/930c9b661bbd3ca1c53475f7e3a1beac/href</a></iframe><p>Create ProductHandler to receive message from <strong>Orchestration</strong> service</p><ul><li>Job worker type: <strong>create-product-1</strong> to receive task <strong>Create product 1</strong> in Camunda BPMN</li><li>Send new value <strong>createProduct1</strong> in message to send to <strong>Micro-2</strong> service</li></ul><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/5c80da47c9fac2970b29663eb6f4ad90/href">https://medium.com/media/5c80da47c9fac2970b29663eb6f4ad90/href</a></iframe><h4>Micro-2 service</h4><p>Add dependency camunda-spring-boot-starter in pom.xml</p><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/30f76b514f3b1b978a4db00e1c71ca24/href">https://medium.com/media/30f76b514f3b1b978a4db00e1c71ca24/href</a></iframe><p>Add camunda configuration in application.yaml</p><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/930c9b661bbd3ca1c53475f7e3a1beac/href">https://medium.com/media/930c9b661bbd3ca1c53475f7e3a1beac/href</a></iframe><p>Create ProductHandler to receive message from <strong>Micro-1 </strong>service</p><ul><li>Job worker type: <strong>create-product-2</strong> to receive task <strong>Create product 2</strong> in Camunda BPMN</li><li>Receive new value <strong>createProduct1</strong> from the message</li></ul><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/bd9a39f829af72edf780bed3ae3011c6/href">https://medium.com/media/bd9a39f829af72edf780bed3ae3011c6/href</a></iframe><h3>Testing</h3><p>Call the rest API, should call from <strong>Orchestration service</strong> to start the process</p><pre>curl --location &#39;localhost:8080/orchestration/create-product-workflow&#39; \<br>--header &#39;Content-Type: application/json&#39; \<br>--data &#39;{<br>    &quot;name&quot;: &quot;Lemon Soda 1001&quot;,<br>    &quot;price&quot;: 15.00<br>}&#39;</pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/685/1*DnMTL26wO6JHTA-tq8pg_w.png" /></figure><h4>Orchestration service</h4><p>Display this log</p><pre>Deployment successful: 2251799813882570<br>Process instance created: 2251799813882571</pre><h4>Micro-1 service</h4><p>Display this log</p><pre>Processing job: 2251799813882578 for process instance: 2251799813882571<br>Job variables: {name=Lemon Soda 1001, price=15.0}<br>Job completed successfully: 2251799813882578</pre><h4>Micro-2 service</h4><p>Display this log</p><p>There is <strong>createProduct1 = true</strong> be created from <strong>Micro-1</strong> service then send the message to <strong>Micro-2</strong> service</p><pre>Processing job: 2251799813882584 for process instance: 2251799813882571<br>Job variables: {name=Lemon Soda 1001, price=15.0, createdProduct1=true}<br>Job completed successfully: 2251799813882584</pre><h3>Reference</h3><ul><li><a href="https://docs.camunda.io/docs/next/self-managed/quickstart/developer-quickstart/docker-compose/">Developer quickstart with Docker Compose | Camunda 8 Docs</a></li><li><a href="https://github.com/camunda/camunda-distributions/tree/main">GitHub — camunda/camunda-distributions: Camunda 8 Self-Managed Distributions</a></li><li><a href="https://docs.camunda.io/docs/next/apis-tools/camunda-spring-boot-starter/getting-started/">Getting started | Camunda 8 Docs</a></li></ul><h3>Source codes</h3><ul><li><a href="https://github.com/porichigo15/orchestration">orchestration</a></li><li><a href="https://github.com/porichigo15/micro-1">micro-1</a></li><li><a href="https://github.com/porichigo15/micro-2">micro-2</a></li></ul><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=7b050aad248d" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Reset SourceTree authentication]]></title>
            <link>https://lomana.medium.com/reset-sourcetree-authentication-442707258f93?source=rss-1390fd7c017c------2</link>
            <guid isPermaLink="false">https://medium.com/p/442707258f93</guid>
            <category><![CDATA[passwords]]></category>
            <category><![CDATA[reset]]></category>
            <category><![CDATA[authentication]]></category>
            <category><![CDATA[git]]></category>
            <category><![CDATA[sourcetree]]></category>
            <dc:creator><![CDATA[Lomana Loma]]></dc:creator>
            <pubDate>Thu, 08 Jan 2026 03:44:12 GMT</pubDate>
            <atom:updated>2026-01-08T03:44:12.527Z</atom:updated>
            <content:encoded><![CDATA[<p>How to reset SourceTree authentication to login with the new username/password</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*Cs_qL0ud0bPiSlYhRGA8nA.png" /></figure><p>Go to C:\Users\&lt;username&gt;\AppData\Local\Atlassian\SourceTree</p><p>Open passwd</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*DJ8dUEKqhXXwwYdJwdtSWA.png" /></figure><p>Remove set of <strong>username/password</strong></p><p>Open SourceTree again</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*y8mqlk_3UfSRCPsTruW3xw.png" /></figure><p>Input new password (ex. access token from GitHub)</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=442707258f93" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[How to back up your code on GitHub]]></title>
            <link>https://lomana.medium.com/how-to-back-up-your-code-on-github-faf475466e4f?source=rss-1390fd7c017c------2</link>
            <guid isPermaLink="false">https://medium.com/p/faf475466e4f</guid>
            <category><![CDATA[vscode]]></category>
            <category><![CDATA[source-control]]></category>
            <category><![CDATA[git]]></category>
            <category><![CDATA[github]]></category>
            <category><![CDATA[cloud-backup]]></category>
            <dc:creator><![CDATA[Lomana Loma]]></dc:creator>
            <pubDate>Thu, 11 Dec 2025 03:16:40 GMT</pubDate>
            <atom:updated>2025-12-11T03:16:40.929Z</atom:updated>
            <content:encoded><![CDATA[<p>This is the topic to back up/store your code into GitHub via VS Code</p><h3>Prerequisite</h3><ol><li>Any project</li><li>VS Code <a href="https://code.visualstudio.com/">Visual Studio Code</a></li></ol><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*iA4OBJAtQY7vGRD_t9opdQ.png" /></figure><h4>Open project via VS Code</h4><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*h-TPWXWuwlPv-2EVszXZ_w.png" /></figure><p>Click on Source Control</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*5kmKq3S4WV2pM_qKFo0T9w.png" /></figure><p>Stage changes per file</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/381/1*UKw4hteWktPo24e91QYHlA.png" /></figure><p>Stage all changes</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/394/1*WHls9hKk4cEWFXnYQgft1Q.png" /></figure><p>After click stage changes it will be in Staged Changes directory</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/367/1*-Xs73qgYKYP7bq5mf6DnkQ.png" /></figure><p>Discard changes per file</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/405/1*ngV26ri8lpmvj64gDyfqFw.png" /></figure><p>Discard all changes</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/424/1*NokWc2Q6GlwQCvyMUsTJwg.png" /></figure><p>Then input commit message and click Commit button</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/395/1*daDxQ1YxFN5eWkGQcrB0mw.png" /></figure><p>Push commit into GitHub</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/373/1*8H3K7cItzPjGCbMydfZQUA.png" /></figure><p>There is warning before push the source code clicks ok button</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/461/1*6y7CIjSsNIMM2rDFEShItw.png" /></figure><p>Click Allow button</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/377/1*TezSdMR3kmNd5hXHPagkfw.png" /></figure><p>Should connect via GitHub</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/889/1*FUjhGD7x4vrGiADyxOr9Mg.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/928/1*UdpPLMW71u9H371LiTsxpg.png" /></figure><p>Once pushed commit successfully in VS Code will display below with the purple cloud icon</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/378/1*k4t6hvKd8khH6MiKt3tdBA.png" /></figure><p>Go to GitHub link and see the result</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*E7jOpqyotjh0f0s4Ro-AhA.png" /></figure><p>Thank you for reading, have a good day :)</p><h3>Reference</h3><ol><li><a href="https://code.visualstudio.com/">Visual Studio Code — The open source AI code editor</a></li></ol><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=faf475466e4f" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Java CRUD MongoDB]]></title>
            <link>https://lomana.medium.com/java-crud-mongodb-dc2f86b5956b?source=rss-1390fd7c017c------2</link>
            <guid isPermaLink="false">https://medium.com/p/dc2f86b5956b</guid>
            <category><![CDATA[spring-boot]]></category>
            <category><![CDATA[backend-development]]></category>
            <category><![CDATA[java]]></category>
            <category><![CDATA[crud]]></category>
            <category><![CDATA[mongodb]]></category>
            <dc:creator><![CDATA[Lomana Loma]]></dc:creator>
            <pubDate>Thu, 04 Dec 2025 10:46:42 GMT</pubDate>
            <atom:updated>2025-12-04T10:46:42.632Z</atom:updated>
            <content:encoded><![CDATA[<p>How to implement Create/Update/List/Delete records via MongoDB</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*CI0qTShhibTq-aPVPFwjeA.png" /></figure><h4>Prerequisite</h4><ol><li>Java project JDK25</li><li><a href="https://docs.docker.com/desktop/">Docker Desktop | Docker Docs</a></li><li><a href="https://www.mongodb.com/products/tools/compass?msockid=03fcbcd564aa6424378aa9e065a7650d">MongoDB Compass | MongoDB</a> GUI</li><li><a href="https://www.postman.com/downloads/">Download Postman | Get Started for Free</a></li></ol><h3>Install MongoDB in local machine</h3><ol><li>Install chocho open CMD <strong>Run as administrator</strong> and type this command</li></ol><pre>@&quot;%SystemRoot%\System32\WindowsPowerShell\v1.0\powershell.exe&quot; -NoProfile -InputFormat None -ExecutionPolicy Bypass -Command &quot;iex ((New-Object System.Net.WebClient).DownloadString(&#39;https://chocolatey.org/install.ps1&#39;))&quot; &amp;&amp; SET &quot;PATH=%PATH%;%ALLUSERSPROFILE%\chocolatey\bin&quot;</pre><ol><li>Go to <a href="https://www.mongodb.com/docs/get-started/?language=nodejs">Get Started — MongoDB Documentation — MongoDB Docs</a></li><li>Open CMD <strong>Run as administrator</strong></li></ol><pre>choco install mongodb-atlas</pre><p>3. Setup deployment in local machine</p><pre>atlas deployments setup myDeployment --type local --mdbVersion 8.0 --port 27017 --connectWith skip</pre><p>Already created container in docker desktop</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/958/1*Ho8LBo_iyAwOVyOMfB4Ogg.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*Fn74sbghG13EVSjVXPQ2ag.png" /></figure><p>4. Connect to MongoDB connection via MongoDB Compass with this url mongodb://localhost:27017/?directConnection=true</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*4z80QD_CPlgSeWziLA4Blg.png" /></figure><p>Create new schema demo</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*zutro-d7MmRHtP8AqnK2nw.png" /></figure><h3>Implement Mongo in Java</h3><p>add spring-data-mongodb in pom.xml</p><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/1b5a22d377ec80f79e05163601be936f/href">https://medium.com/media/1b5a22d377ec80f79e05163601be936f/href</a></iframe><p>Create Model Product and ProductDto use Dto to prevent call directly to Model which connect to database.</p><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/860a150a0581a78dd523bf529b3f7042/href">https://medium.com/media/860a150a0581a78dd523bf529b3f7042/href</a></iframe><p>ProductDto has method toDao to convert dto into dao</p><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/cae3cd82cd57891d3d10f4aed0096a4a/href">https://medium.com/media/cae3cd82cd57891d3d10f4aed0096a4a/href</a></iframe><p>Create Repository</p><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/0a97b214c72f6d26982bea7eb8cf57e7/href">https://medium.com/media/0a97b214c72f6d26982bea7eb8cf57e7/href</a></iframe><p>Create service</p><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/8383721fb3a485064d5089a51acfe751/href">https://medium.com/media/8383721fb3a485064d5089a51acfe751/href</a></iframe><p>Create controller</p><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/0d248e2df735776c63f834bf697c5340/href">https://medium.com/media/0d248e2df735776c63f834bf697c5340/href</a></iframe><p>Update application.yaml</p><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/fca233b10d5044b5790238f5852f187d/href">https://medium.com/media/fca233b10d5044b5790238f5852f187d/href</a></iframe><p>Create MongoConfig to override mongoDB configuration</p><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/404e43f7f901e9d1835281e54bf2da31/href">https://medium.com/media/404e43f7f901e9d1835281e54bf2da31/href</a></iframe><p>Thank you for reading :)</p><h3>Reference</h3><ul><li><a href="https://github.com/porichigo15/demo-mongo-db">Source code</a></li><li><a href="https://docs.docker.com/desktop/">Docker Desktop | Docker Docs</a></li><li><a href="https://www.postman.com/downloads/">Download Postman | Get Started for Free</a></li><li><a href="https://www.mongodb.com/docs/get-started/?language=nodejs">Get Started — MongoDB Documentation — MongoDB Docs</a></li></ul><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=dc2f86b5956b" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Using Custom Fonts with Next.js]]></title>
            <link>https://lomana.medium.com/using-custom-fonts-with-next-js-3013eae60db0?source=rss-1390fd7c017c------2</link>
            <guid isPermaLink="false">https://medium.com/p/3013eae60db0</guid>
            <category><![CDATA[custom-fonts]]></category>
            <category><![CDATA[fonts]]></category>
            <category><![CDATA[nextjs]]></category>
            <category><![CDATA[font-style]]></category>
            <category><![CDATA[multiple-font]]></category>
            <dc:creator><![CDATA[Lomana Loma]]></dc:creator>
            <pubDate>Tue, 01 Apr 2025 03:17:17 GMT</pubDate>
            <atom:updated>2025-04-01T03:17:17.987Z</atom:updated>
            <content:encoded><![CDATA[<p>How to customize fonts on Next.js</p><h3>Preparation</h3><ul><li>Next.js project</li><li>Font files woff2</li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*FJKAANzeSsDrm-xhxZoUag.png" /></figure><h3>Add fonts</h3><p>Add font files into /fonts we can support multiple font styles</p><pre>├── app/<br>├── fonts/<br>│   ├── font.ts<br>│   ├── Poppins<br>│   │   ├── Poppins-Regular.woff2<br>│   │   └── Poppins-Bold.woff2<br>│   ├── NotoSansThai<br>│   │   ├── NotoSansThai-Lightr.woff2<br>│   │   └── NotoSansThai-SemiBold.woff2</pre><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/387ca9a522231d59911bf0cb2ecc1ebf/href">https://medium.com/media/387ca9a522231d59911bf0cb2ecc1ebf/href</a></iframe><p>Update layout.tsx call @/fonts/font and use font.className</p><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/3713e6f86f72fdb72b771ac25aebd834/href">https://medium.com/media/3713e6f86f72fdb72b771ac25aebd834/href</a></iframe><h3>Result!!</h3><p>Old font</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/999/1*dcU1rGXzy185Dc7fB6oUQQ.png" /></figure><p>New font</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/904/1*lO9VTVbsgZblnIfKMN3flA.png" /></figure><p>Thank you for your reading, have a nice day :)</p><h3>Reference</h3><p><a href="https://nextjs.org/docs/app/getting-started/images-and-fonts#local-fonts">Getting Started: Images and Fonts | Next.js</a></p><p><a href="https://github.com/porichigo15/custom-fonts">porichigo15/custom-fonts: This repository uses for implementing custom fonts in Next.js</a></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=3013eae60db0" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[LINE authentication with Next.js 2025]]></title>
            <link>https://lomana.medium.com/line-authentication-with-next-js-2025-8a8eab5ed379?source=rss-1390fd7c017c------2</link>
            <guid isPermaLink="false">https://medium.com/p/8a8eab5ed379</guid>
            <category><![CDATA[line]]></category>
            <category><![CDATA[nextjs]]></category>
            <category><![CDATA[nextjs-15]]></category>
            <category><![CDATA[line-login]]></category>
            <category><![CDATA[authentication]]></category>
            <dc:creator><![CDATA[Lomana Loma]]></dc:creator>
            <pubDate>Tue, 04 Mar 2025 03:02:47 GMT</pubDate>
            <atom:updated>2025-03-10T13:35:14.727Z</atom:updated>
            <content:encoded><![CDATA[<p>How to implement LINE login and logout in Next.js v15</p><h3>Preparation</h3><ul><li>Next.js project</li><li>LIFF <a href="https://developers.line.biz/console">https://developers.line.biz/console</a></li><li>ngrok <a href="https://dashboard.ngrok.com/">https://dashboard.ngrok.com</a></li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*MnkjZeOejtkGyg8H3VCRnw.png" /></figure><h3>Setup Line provider</h3><p>Create provider</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*YM78Mo8JbrmTWTsDHx0FCA.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/746/1*9rIsQDBQCtsBevLnFm6v8A.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*goZfixs6D2iLzlZkL6T-Ww.png" /></figure><p><strong>Create LIFF (LINE Front-end Framework)</strong></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*2-aaVARP5jGD16h7IaxJ4w.png" /></figure><p>Click on <strong>LIFF</strong> menu and input LIFF detail</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*wEl1tqgYRFXZ-mCuwtnZGg.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*dCJCu6WZgviFG_1U1pdQAw.png" /></figure><p><strong>Endpoint URL</strong> is url from ngrok <a href="https://4ae3-171-4-249-65.ngrok-free.app/">https://4ae3-171-4-249-65.ngrok-free.app</a></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*S32HTzHeJacHBYbTYYyrmw.png" /></figure><p>Don’t forget to publish your application</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*pV6jxyx1HsHTGfmcGXHqbw.png" /></figure><h3>Install libs</h3><p>install @line/liff in our project</p><pre>npm install --save @line/liff<br><br># pnpm<br>pnpm install --save @line/liff</pre><h3>Implement the code</h3><p>Init LIFF sdk</p><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/52b33950c61e5802e464f8b3142ec0dd/href">https://medium.com/media/52b33950c61e5802e464f8b3142ec0dd/href</a></iframe><p>Declare accessToken, idToken, profile and use in the return section.</p><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/64b486b8317ce8af79ced3b1712141e8/href">https://medium.com/media/64b486b8317ce8af79ced3b1712141e8/href</a></iframe><p>Add hostname in next.config.ts</p><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/b1b17877747386a6eab4e5217db75b22/href">https://medium.com/media/b1b17877747386a6eab4e5217db75b22/href</a></iframe><h3>Test it!!</h3><p>Click on <strong>login </strong>button</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*2TMood6sBz6MWUpAZflSiQ.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/800/1*W07nCij8b450ExqQ9KHMpw.png" /></figure><p>Click on <strong>logout </strong>button</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*77lGKd3vYdJ8w59zIW-RHQ.png" /></figure><h3>Reference</h3><p><a href="https://developers.line.biz/en/docs/liff/developing-liff-apps/#getting-environment">Developing a LIFF app | LINE Developers</a></p><p><a href="https://github.com/porichigo15/line-login-next">porichigo15/line-login-next</a></p><p>Thank you for reading, have a nice day :)</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=8a8eab5ed379" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Logging by Aspect Oriented Programming (Spring AOP)]]></title>
            <link>https://lomana.medium.com/logging-by-aspect-oriented-programming-spring-aop-dc2b67ea978f?source=rss-1390fd7c017c------2</link>
            <guid isPermaLink="false">https://medium.com/p/dc2b67ea978f</guid>
            <category><![CDATA[aspectorientedprogramming]]></category>
            <category><![CDATA[logging-and-monitoring]]></category>
            <category><![CDATA[java-spring-boot]]></category>
            <category><![CDATA[aop]]></category>
            <category><![CDATA[logging]]></category>
            <dc:creator><![CDATA[Lomana Loma]]></dc:creator>
            <pubDate>Thu, 20 Feb 2025 03:02:27 GMT</pubDate>
            <atom:updated>2025-02-20T03:02:27.769Z</atom:updated>
            <content:encoded><![CDATA[<p>How to log messages for all points without create duplicated code in a Spring Boot application</p><h3>Preparation</h3><ul><li>Java spring boot project</li><li>JDK 23</li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*b_mTkF9rfXJzuCInK4K94w.png" /></figure><h3>Concept</h3><p>AOP (Aspect Oriented Programming) is the way to handle duplicated common code which affect multiple modules.</p><p><strong>Aspect </strong>— The module which calling all the time depend on specific execution.</p><p><strong>Join point </strong>— A point which return method name, method execution.</p><p><strong>Actions </strong>— The method action</p><ul><li>@Before — be called before entering the method.</li><li>@After — be called after completing all process or logic.</li><li>@AfterReturning — be called before @After and has returning return the data from module.</li><li>@AfterThrowing — be called before @After and has throwing return exception class from the module.</li></ul><p><strong>Execution</strong></p><pre>execution(* &lt;package_name&gt;.*.*(..))<br><br>Example<br>execution(* com.example.spring_aop_demo.controller.*.*(..))</pre><ul><li>* 2nd → execute every class within package.</li><li>* 3rd → execute every method within class.</li></ul><h3>Setup AOP config</h3><p><strong>Install libs</strong></p><pre>&lt;!-- https://mvnrepository.com/artifact/org.aspectj/aspectjweaver --&gt;<br>&lt;dependency&gt;<br>  &lt;groupId&gt;org.aspectj&lt;/groupId&gt;<br>  &lt;artifactId&gt;aspectjweaver&lt;/artifactId&gt;<br>  &lt;version&gt;1.9.22.1&lt;/version&gt;<br>&lt;/dependency&gt;</pre><p><strong>Create Aspect class</strong></p><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/d22a6242a9625e096da40064b32d250c/href">https://medium.com/media/d22a6242a9625e096da40064b32d250c/href</a></iframe><p><strong>Create controller</strong></p><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/1177e4c52a6faa547068e8120a228c2d/href">https://medium.com/media/1177e4c52a6faa547068e8120a228c2d/href</a></iframe><h3>Result</h3><p>Test @Before, @AfterReturning, @After</p><pre>curl --location &#39;http://localhost:8080/api/message&#39;</pre><pre>2025-02-19T16:55:13.734+07:00  INFO 32024 --- [demo] [nio-8080-exec-1] c.e.s.aspect.LoggingAspect               : enter before with name: ResponseEntity com.example.spring_aop_demo.controller.MessageController.displayText()<br>2025-02-19T16:55:20.181+07:00  INFO 32024 --- [demo] [nio-8080-exec-1] c.e.s.aspect.LoggingAspect               : enter after returning with name: ResponseEntity com.example.spring_aop_demo.controller.MessageController.displayText() and result: &lt;200 OK OK,Hello World,[]&gt;<br>2025-02-19T16:55:21.391+07:00  INFO 32024 --- [demo] [nio-8080-exec-1] c.e.s.aspect.LoggingAspect               : enter after with name: ResponseEntity com.example.spring_aop_demo.controller.MessageController.displayText()</pre><p>Test @Before, @AfterThrowing, @After</p><pre>curl --location --request GET &#39;http://localhost:8080/api/message/throw-exception&#39; \<br>--header &#39;Content-Type: application/json&#39; \<br>--data &#39;Hello&#39;</pre><pre>2025-02-19T16:57:40.290+07:00  INFO 32024 --- [demo] [nio-8080-exec-5] c.e.s.aspect.LoggingAspect               : enter before with name: ResponseEntity com.example.spring_aop_demo.controller.MessageController.throwException()<br>2025-02-19T16:57:42.457+07:00  INFO 32024 --- [demo] [nio-8080-exec-5] c.e.s.aspect.LoggingAspect               : enter after throwing with name: ResponseEntity com.example.spring_aop_demo.controller.MessageController.throwException() and exception: null<br>2025-02-19T16:57:43.652+07:00  INFO 32024 --- [demo] [nio-8080-exec-5] c.e.s.aspect.LoggingAspect               : enter after with name: ResponseEntity com.example.spring_aop_demo.controller.MessageController.throwException()</pre><h3>Reference</h3><p><a href="https://github.com/porichigo15/spring-aop-demo">porichigo15/spring-aop-demo</a></p><p>Thank you for reading, have a nice day :)</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=dc2b67ea978f" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Login Facebook in Next.js Typescript]]></title>
            <link>https://lomana.medium.com/login-facebook-in-next-js-typescript-94eede394847?source=rss-1390fd7c017c------2</link>
            <guid isPermaLink="false">https://medium.com/p/94eede394847</guid>
            <category><![CDATA[logouts]]></category>
            <category><![CDATA[facebook]]></category>
            <category><![CDATA[facebook-sdk]]></category>
            <category><![CDATA[login]]></category>
            <category><![CDATA[nextjs]]></category>
            <dc:creator><![CDATA[Lomana Loma]]></dc:creator>
            <pubDate>Sat, 08 Feb 2025 06:53:47 GMT</pubDate>
            <atom:updated>2025-02-08T09:36:40.778Z</atom:updated>
            <content:encoded><![CDATA[<p>How to login and logout Facebook in next.js in typescript style</p><p>For using Facebook SDK, we need to use https so we have to run ngrok to generate localhost to https URL.</p><h3>Preparation</h3><ul><li>Nextjs project</li><li>ngrok <a href="https://dashboard.ngrok.com/get-started">https://dashboard.ngrok.com/get-started</a></li><li>Application in Facebook <a href="https://developers.facebook.com/">Facebook for Developers</a></li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*zqckr-lJrT0dWQ-QMctNIA.png" /></figure><h3>Install libs</h3><pre>npm i @types/facebook-js-sdk<br><br>-- pnpm<br>pnpm i @types/facebook-js-sdk</pre><h3>Coding</h3><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/862739ad28a220e9a838ff9741fece2d/href">https://medium.com/media/862739ad28a220e9a838ff9741fece2d/href</a></iframe><h3>Setup Facebook app</h3><p>Go to <a href="https://developers.facebook.com/apps/creation/">Create an app — Meta for Developers</a></p><p>Create app with Authenticate and request data from users with Facebook Login</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*MSM3qy7UvNOQg3NPRaWhhg.png" /></figure><p>Copy App ID</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*0sHFIJuWASUwsAztAXZ7xQ.png" /></figure><p>Turn on Login with the JavaScript SDK and fill out Allowed Domains for JavaScript SDK with ngrok url</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*0fLZwUSRx8VTobGJC_ZZ_w.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*aD2DQenRjjQ1BNDlEvFKug.png" /></figure><h3>Sign in</h3><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*4nUHQlpcGmIYLEUdzNgSIw.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*WYU1D-M8iY44xHofogRkAg.png" /></figure><h4>Sign out</h4><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*7QjsltF71tKYGTgLOqYQLg.png" /></figure><h3>Reference</h3><p><a href="https://developers.facebook.com/docs/javascript/quickstart">Quickstart — Facebook SDK for JavaScript</a></p><p><a href="https://github.com/porichigo15/sign-in-fb-nextjs">porichigo15/sign-in-fb-nextjs</a></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=94eede394847" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Translation i18n in Next.js with typescript (client side)]]></title>
            <link>https://lomana.medium.com/translation-i18n-in-next-js-with-typescript-client-side-170b3dd08dbb?source=rss-1390fd7c017c------2</link>
            <guid isPermaLink="false">https://medium.com/p/170b3dd08dbb</guid>
            <category><![CDATA[translation]]></category>
            <category><![CDATA[typescript]]></category>
            <category><![CDATA[i18next]]></category>
            <category><![CDATA[i18n]]></category>
            <category><![CDATA[nextjs]]></category>
            <dc:creator><![CDATA[Lomana Loma]]></dc:creator>
            <pubDate>Wed, 29 Jan 2025 11:40:59 GMT</pubDate>
            <atom:updated>2025-01-29T13:12:04.358Z</atom:updated>
            <content:encoded><![CDATA[<p>How to implement i18n translation in next.js with typescript</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*fHD88zhzz8wJzYkLLMsP0A.png" /></figure><h3>Preparation</h3><ul><li>Next.js project</li><li>pnpm (optional)</li></ul><h3>Project structure</h3><pre>next-i18n-project/<br>├── app/<br>│   ├── layout.tsx<br>│   ├── page.tsx<br>├── libs/<br>│   ├── i18n/<br>│   │   ├── i18n-config.ts<br>│   │   ├── i18n.ts<br>│   ├── providers/<br>│   │   ├── translations-provider.tsx<br>├── locales/<br>│   ├── en/<br>│   │   ├── common.json<br>│   ├── th/<br>│   │   ├── common.json<br>├── package.json</pre><h3>Install and setup translation</h3><pre>pnpm install i18next --save<br>pnpm install i18next-resources-to-backend --save<br>pnpm install react-i18next --save<br>pnpm install next-i18n-router --save</pre><p>add locales locales/en/common.json</p><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/aec78474e5ad7b555239ea849eb3c7ff/href">https://medium.com/media/aec78474e5ad7b555239ea849eb3c7ff/href</a></iframe><p>create libs\i18n\i18n-config.ts support typescript</p><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/1685ad7b177e65761a94ee3af497d155/href">https://medium.com/media/1685ad7b177e65761a94ee3af497d155/href</a></iframe><p>create libs\i18n\i18n.ts to initial translations</p><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/751beb0b7e4ab3bd8904020f0fb27ba8/href">https://medium.com/media/751beb0b7e4ab3bd8904020f0fb27ba8/href</a></iframe><p>wrap libs/provider/translations-provider.tsx in app/layout.tsx</p><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/914dabe019764dde5be78086c731e966/href">https://medium.com/media/914dabe019764dde5be78086c731e966/href</a></iframe><p>wrap children with TranslationsProvider</p><p>send props: i18nNamespaces, locale, resources</p><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/874d9752dbfb96530f629c2ef576b50c/href">https://medium.com/media/874d9752dbfb96530f629c2ef576b50c/href</a></iframe><h3>Support Typescript</h3><figure><img alt="" src="https://cdn-images-1.medium.com/max/573/1*ceVk_3HNY2PxcefwF0kEZA.png" /></figure><p>install library</p><pre>pnpm install i18next-resources-for-ts --save</pre><p>create new file <a href="http://twitter.com/Types">@Types</a>\i18next.d.ts</p><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/d685fd833705723c2c29e389daa609c9/href">https://medium.com/media/d685fd833705723c2c29e389daa609c9/href</a></iframe><p>add command in package.json then execute pnpm i18n</p><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/16e22c02424359f476ddda65c04f2c17/href">https://medium.com/media/16e22c02424359f476ddda65c04f2c17/href</a></iframe><h3>Use translation in the component</h3><p>use const { t } = useTranslation(); in the client component</p><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/7e1f79ca810b50782917f6f299cfcb82/href">https://medium.com/media/7e1f79ca810b50782917f6f299cfcb82/href</a></iframe><p>change the default language in libs\i18n\i18n-config.ts</p><p>defaultLocale: &#39;xx&#39;</p><p>Language: Thai</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/724/1*UaYn-hxSWRlb_cCh_Q-KgA.png" /></figure><p>Language: English</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/616/1*JImED2mntfrkZbHOQvp5HA.png" /></figure><p>Thank you for reading, have a nice day</p><h3>Reference</h3><p><a href="https://www.i18next.com/overview/getting-started">Getting started | i18next documentation</a></p><p><a href="https://nextjs.org/docs">Introduction | Next.js</a></p><p><a href="https://pnpm.io/">Fast, disk space efficient package manager | pnpm</a></p><p><a href="https://github.com/porichigo15/next-i18n-project">porichigo15/next-i18n-project</a></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=170b3dd08dbb" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Best Practices for Committing Code in Git]]></title>
            <link>https://lomana.medium.com/best-practices-for-committing-code-in-git-c6debac67ad3?source=rss-1390fd7c017c------2</link>
            <guid isPermaLink="false">https://medium.com/p/c6debac67ad3</guid>
            <category><![CDATA[commit]]></category>
            <category><![CDATA[security]]></category>
            <category><![CDATA[code-review]]></category>
            <category><![CDATA[git]]></category>
            <category><![CDATA[quality]]></category>
            <dc:creator><![CDATA[Lomana Loma]]></dc:creator>
            <pubDate>Mon, 19 Aug 2024 03:47:24 GMT</pubDate>
            <atom:updated>2024-08-19T03:47:24.383Z</atom:updated>
            <content:encoded><![CDATA[<p>Ensuring Code Quality: Using Husky and Lint-Staged for Git Commits</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*MTDl1u7XXZOuM9HHD9Jclg.png" /></figure><h4>Preparation</h4><ul><li>Git repository</li><li>husky <a href="https://typicode.github.io/husky/get-started.html">Get started | Husky</a></li><li>lint-staged <a href="https://github.com/lint-staged/lint-staged">lint-staged/lint-staged</a></li></ul><p>Note: I use pnpm to execute command</p><h4>Install lint-staged</h4><pre>// install lint-staged<br>pnpm install --save-dev lint-staged</pre><p>Add script lint-staged-files in package.json</p><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/e16638a398acee32bfbe3e79201e69fa/href">https://medium.com/media/e16638a398acee32bfbe3e79201e69fa/href</a></iframe><p>Add .lintstagedrc in root directory</p><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/86c48899be7aa9775b2c8a0345aa9ea3/href">https://medium.com/media/86c48899be7aa9775b2c8a0345aa9ea3/href</a></iframe><h4>Install husky</h4><pre>// install husky lib<br>pnpm add - save-dev husky<br><br>// init husky to create pre-commit file<br>pnpm exec husky init</pre><p>System will generate .husky/pre-commit then update content in pre-commit</p><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/d939e41be21aa221ac991aea24b9c723/href">https://medium.com/media/d939e41be21aa221ac991aea24b9c723/href</a></iframe><h4>Test it</h4><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*zYcglpuWwEmZUpdmglfbTA.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*ZGcLaRgp_U6lg8G80uwVNg.png" /></figure><h4>Reference</h4><ul><li><a href="https://typicode.github.io/husky/get-started.html">Get started | Husky</a></li><li><a href="https://github.com/lint-staged/lint-staged">lint-staged/lint-staged: 🚫💩 — Run linters on git staged files</a></li></ul><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=c6debac67ad3" width="1" height="1" alt="">]]></content:encoded>
        </item>
    </channel>
</rss>