<?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"><channel><title><![CDATA[Some Ordinary Developer]]></title><description><![CDATA[Through this blog, I aim to share my expertise, thoughts, and experience.]]></description><link>https://someordinarydeveloper.com</link><generator>RSS for Node</generator><lastBuildDate>Wed, 08 Apr 2026 12:18:35 GMT</lastBuildDate><atom:link href="https://someordinarydeveloper.com/rss.xml" rel="self" type="application/rss+xml"/><language><![CDATA[en]]></language><ttl>60</ttl><item><title><![CDATA[Solving LocalStorage Token Sync in Development]]></title><description><![CDATA[The Problem: Manual Token Transfer Between Environments
Modern web applications often rely on authentication tokens stored in the browser's localStorage to manage user sessions. During development, teams frequently work across multiple environments—s...]]></description><link>https://someordinarydeveloper.com/solving-localstorage-token-sync-in-development</link><guid isPermaLink="true">https://someordinarydeveloper.com/solving-localstorage-token-sync-in-development</guid><category><![CDATA[chrome extension]]></category><category><![CDATA[localstorage]]></category><category><![CDATA[Developer]]></category><category><![CDATA[authentication]]></category><category><![CDATA[React]]></category><category><![CDATA[sync]]></category><category><![CDATA[automation]]></category><category><![CDATA[AI]]></category><dc:creator><![CDATA[Kunal Mathur]]></dc:creator><pubDate>Sat, 17 Jan 2026 18:30:35 GMT</pubDate><enclosure url="https://cdn.hashnode.com/res/hashnode/image/stock/unsplash/AVBwSxl5mwk/upload/260b47ae3cbe008954647e8ccd323838.jpeg" length="0" type="image/jpeg"/><content:encoded><![CDATA[<h2 id="heading-the-problem-manual-token-transfer-between-environments">The Problem: Manual Token Transfer Between Environments</h2>
<p>Modern web applications often rely on authentication tokens stored in the browser's <code>localStorage</code> to manage user sessions. During development, teams frequently work across multiple environments—such as a deployed development server and a local <a target="_blank" href="http://localhost"><code>localhost</code></a> instance.</p>
<p>A common workflow challenge arises:<br /><strong>Developers must log in to the development environment, manually copy the access token from localStorage, and paste it into the local environment's localStorage to authenticate their local React app.</strong></p>
<p>This process is:</p>
<ul>
<li><p><strong>Repetitive:</strong> Every time the token expires or a new session is needed, the process must be repeated.</p>
</li>
<li><p><strong>Error-prone:</strong> Manual copying and pasting can lead to mistakes, such as copying the wrong value or pasting into the wrong key.</p>
</li>
<li><p><strong>Time-consuming:</strong> Interrupts the development flow and wastes valuable time.</p>
</li>
</ul>
<hr />
<h2 id="heading-the-solution-automating-localstorage-sync-with-a-chrome-extension">The Solution: Automating LocalStorage Sync with a Chrome Extension</h2>
<p>To address this pain point, our team built the <strong>LocalStorage Sync Chrome Extension</strong>.</p>
<blockquote>
<p><strong>Try it out:</strong><br />Clone the <a target="_blank" href="https://github.com/iKunalmathur/LocalStorage-Sync-Browser-Extension">LocalStorage Sync Browser Extension</a>, load it into Chrome, and streamline your development process today!</p>
</blockquote>
<h3 id="heading-how-does-it-work">How Does It Work?</h3>
<ol>
<li><p><strong>Configure Once:</strong><br /> Set the source environment URL (where you're logged in), the target environment URL (your local app), and the localStorage key (e.g., <code>access_token</code>) in the extension popup.</p>
</li>
<li><p><strong>One-Click Sync:</strong><br /> Click "Sync Now" in the extension. The extension:</p>
<ul>
<li><p>Reads the token from the source environment's localStorage.</p>
</li>
<li><p>Writes the token to the target environment's localStorage.</p>
</li>
<li><p>Reloads the target tab so your app picks up the new token.</p>
</li>
</ul>
</li>
<li><p><strong>No More Manual Steps:</strong><br /> No more opening DevTools, copying, switching tabs, and pasting. The extension automates the entire process.</p>
</li>
</ol>
<hr />
<h2 id="heading-benefits">Benefits</h2>
<ul>
<li><p><strong>Saves Time:</strong> Reduces a multi-step manual process to a single click.</p>
</li>
<li><p><strong>Reduces Errors:</strong> Eliminates mistakes from manual copying and pasting.</p>
</li>
<li><p><strong>Boosts Productivity:</strong> Lets developers focus on coding, not on repetitive setup tasks.</p>
</li>
<li><p><strong>Easy to Use:</strong> Simple configuration and persistent settings for repeated use.</p>
</li>
</ul>
<hr />
<h2 id="heading-conclusion">Conclusion</h2>
<p>If your team is tired of manually syncing authentication tokens between environments, the LocalStorage Sync Chrome Extension is a simple, effective solution.<br />Automate the tedious parts of your workflow and get back to building great applications!</p>
]]></content:encoded></item><item><title><![CDATA[One Git, Two Identities: How to Keep GitHub and Bitbucket From Mixing You Up]]></title><description><![CDATA[If you juggle personal projects on GitHub and company work on Bitbucket, you’ve probably run into this: You push your work code, and Bitbucket says —

"This user cannot be matched to an Atlassian account."

Why? Because Git is still using your person...]]></description><link>https://someordinarydeveloper.com/one-git-two-identities-how-to-keep-github-and-bitbucket-from-mixing-you-up</link><guid isPermaLink="true">https://someordinarydeveloper.com/one-git-two-identities-how-to-keep-github-and-bitbucket-from-mixing-you-up</guid><category><![CDATA[Git]]></category><category><![CDATA[GitHub]]></category><category><![CDATA[Bitbucket]]></category><category><![CDATA[Linux]]></category><category><![CDATA[Developer]]></category><category><![CDATA[chatgpt]]></category><dc:creator><![CDATA[Kunal Mathur]]></dc:creator><pubDate>Mon, 11 Aug 2025 18:29:13 GMT</pubDate><enclosure url="https://cdn.hashnode.com/res/hashnode/image/stock/unsplash/842ofHC6MaI/upload/89f50987e476fe5fbf9b856cac3c5346.jpeg" length="0" type="image/jpeg"/><content:encoded><![CDATA[<p>If you juggle personal projects on GitHub and company work on Bitbucket, you’ve probably run into this: You push your work code, and Bitbucket says —</p>
<blockquote>
<p>"This user cannot be matched to an Atlassian account."</p>
</blockquote>
<p>Why? Because Git is still using your personal email and username from your GitHub setup. Good news: you don’t need two laptops or endless git config switches — you just need to tell Git which identity to use per repository.</p>
<h2 id="heading-the-problem">🐞 The Problem</h2>
<p>By default, Git uses your global config, meaning:</p>
<pre><code class="lang-bash">git config --global user.name <span class="hljs-string">"Your Personal Name"</span> 

git config --global user.email <span class="hljs-string">"you@personal.com"</span>
</code></pre>
<p>So, whether you’re in your weekend side project or your company’s Bitbucket repo, Git thinks you’re the same person.</p>
<p>That’s why Bitbucket can’t match your personal email to your Atlassian account.</p>
<h2 id="heading-the-fix-set-identity-per-repo">🛠️ The Fix: Set Identity Per Repo</h2>
<p>Let’s make Git smart enough to use work details for Bitbucket and personal details for GitHub.</p>
<ol>
<li><p>Go to your Bitbucket project folder</p>
<pre><code class="lang-bash">  /path/to/bitbucket-project
</code></pre>
</li>
<li><p>Set work-specific details</p>
<pre><code class="lang-bash"> git config user.name <span class="hljs-string">"Your Work Name"</span> 
 git config user.email <span class="hljs-string">"your-work-email@company.com"</span>
</code></pre>
<p> 💡 This writes settings to the repo’s .git/config file — leaving your global GitHub settings untouched.</p>
</li>
<li><p>Check it worked</p>
<pre><code class="lang-bash"> git config user.name

 git config user.email
</code></pre>
</li>
<li><p>Should show your work identity inside the Bitbucket repo.</p>
</li>
</ol>
<h2 id="heading-bonus-automate-it">🎁 Bonus: Automate It</h2>
<p>If you don’t want to remember to switch every time, tell Git to auto-load a config for all repos inside a certain folder.</p>
<p>Edit your global Git config:</p>
<pre><code class="lang-bash">git config --global --edit
</code></pre>
<p>Add:</p>
<pre><code class="lang-ini"><span class="hljs-section">[includeIf "gitdir:~/work-projects/"]</span> 
    <span class="hljs-attr">path</span> = ~/.gitconfig-work
</code></pre>
<p>Then in ~/.gitconfig-work:</p>
<pre><code class="lang-ini"><span class="hljs-section">[user]</span> 
    <span class="hljs-attr">name</span> = Your Work Name 
    <span class="hljs-attr">email</span> = your-work-email@company.com
</code></pre>
<p>Now, anything in <code>~/work-projects</code> will automatically use your work identity.</p>
<h2 id="heading-final-push">🚀 Final Push</h2>
<p>With this setup:</p>
<ul>
<li><p>Personal projects → GitHub email &amp; name</p>
</li>
<li><p>Work projects → Bitbucket email &amp; name</p>
</li>
<li><p>No more “user cannot be matched” errors</p>
</li>
<li><p>No risk of leaking personal details into work commits</p>
</li>
</ul>
<p>💡 Tip: If you’re using SSH keys, you can also set separate keys for GitHub and Bitbucket so your push URLs never get mixed up.</p>
]]></content:encoded></item><item><title><![CDATA[Linux Software Installation Guide: 5 Easy Ways to Install Your Favorite Apps]]></title><description><![CDATA[So, you've just dived into the world of Linux and you're itching to get your hands on some cool software. Fear not, fellow penguin enthusiast! In this guide, we'll explore five hassle-free ways to install applications on your Linux machine, using eve...]]></description><link>https://someordinarydeveloper.com/linux-software-installation-guide-5-easy-ways-to-install-your-favorite-apps</link><guid isPermaLink="true">https://someordinarydeveloper.com/linux-software-installation-guide-5-easy-ways-to-install-your-favorite-apps</guid><category><![CDATA[Linux]]></category><category><![CDATA[software]]></category><category><![CDATA[Installation]]></category><category><![CDATA[tips]]></category><dc:creator><![CDATA[Kunal Mathur]]></dc:creator><pubDate>Sat, 30 Mar 2024 18:30:12 GMT</pubDate><enclosure url="https://cdn.hashnode.com/res/hashnode/image/stock/unsplash/4Mw7nkQDByk/upload/a703252836cfe47824ba011816507204.jpeg" length="0" type="image/jpeg"/><content:encoded><![CDATA[<p>So, you've just dived into the world of Linux and you're itching to get your hands on some cool software. Fear not, fellow penguin enthusiast! In this guide, we'll explore five hassle-free ways to install applications on your Linux machine, using everyone's favorite browser, Firefox, as our example.</p>
<h3 id="heading-1-official-distro-repositories">1. Official Distro Repositories</h3>
<p>The official repositories of your Linux distribution contain a vast array of pre-approved software. Installing Firefox from here is a breeze:</p>
<pre><code class="lang-bash">sudo apt-get update
sudo apt-get install firefox
</code></pre>
<h3 id="heading-2-software-official-repositories">2. Software Official Repositories</h3>
<p>Some software, like Firefox, maintains its repositories. For instance, on Ubuntu, you can add the Mozilla repository and install Firefox:</p>
<pre><code class="lang-bash">sudo add-apt-repository ppa:mozillateam/firefox-next
sudo apt-get update
sudo apt-get install firefox
</code></pre>
<h3 id="heading-3-flatpak">3. Flatpak</h3>
<p>Flatpak is a universal packaging system. For Firefox, it's as simple as:</p>
<pre><code class="lang-bash">flatpak install flathub org.mozilla.firefox
</code></pre>
<h3 id="heading-4-snap-store">4. Snap Store</h3>
<p>Snaps are containerized software packages. To get Firefox from the Snap Store:</p>
<pre><code class="lang-bash">sudo snap install firefox
</code></pre>
<h3 id="heading-5-appimage">5. AppImage</h3>
<p>AppImage packages are self-contained and run on most Linux systems. Grabbing Firefox is a piece of cake:</p>
<p>Download the latest release from:</p>
<p><a target="_blank" href="https://github.com/srevinsaju/Firefox-Appimage">https://github.com/srevinsaju/Firefox-Appimage</a></p>
<pre><code class="lang-bash">chmod +x Firefox.AppImage
./Firefox.AppImage
</code></pre>
<h3 id="heading-in-a-nutshell">In a nutshell</h3>
<p>Whether you prefer the familiarity of your distributi<a target="_blank" href="https://github.com/srevinsaju/Firefox-Appimage">on's repositories, the efficiency of Flatpak, t</a>he security of the Snap Store, or the portability of AppImage, Linux offers a smorgasbord of options to suit your taste.</p>
<h3 id="heading-conclusion">Conclusion</h3>
<p>So, there you have it! The world of Linux software installation isn't just functional; it's downright fun. Experiment with these methods, explore new apps and revel in the freedom that Linux provides. Happy exploring!</p>
]]></content:encoded></item><item><title><![CDATA[No-Nonsense Docker Commands for Developers]]></title><description><![CDATA[Discover the simplicity of Docker with our guide on "No-Nonsense Docker Commands for Developers." Streamline your container workflow effortlessly and boost your development game with straightforward, practical instructions.
Build Image :
Build an ima...]]></description><link>https://someordinarydeveloper.com/no-nonsense-docker-commands-for-developers</link><guid isPermaLink="true">https://someordinarydeveloper.com/no-nonsense-docker-commands-for-developers</guid><category><![CDATA[Docker]]></category><category><![CDATA[Commands]]></category><category><![CDATA[developers]]></category><category><![CDATA[easy]]></category><category><![CDATA[tips]]></category><dc:creator><![CDATA[Kunal Mathur]]></dc:creator><pubDate>Sat, 20 Jan 2024 18:00:01 GMT</pubDate><enclosure url="https://cdn.hashnode.com/res/hashnode/image/stock/unsplash/HjBOmBPbi9k/upload/d16546edce1e3ce93d572139a5be0ee1.jpeg" length="0" type="image/jpeg"/><content:encoded><![CDATA[<p>Discover the simplicity of Docker with our guide on "No-Nonsense Docker Commands for Developers." Streamline your container workflow effortlessly and boost your development game with straightforward, practical instructions.</p>
<h3 id="heading-build-image">Build Image :</h3>
<p>Build an image from a Dockerfile:</p>
<pre><code class="lang-bash">docker build -t &lt;image-name&gt;:&lt;tag&gt;
</code></pre>
<p>Build an image with a specific Dockerfile:</p>
<pre><code class="lang-bash">docker build -f &lt;Dockerfile-name&gt; -t &lt;image-name&gt;:&lt;tag&gt;
</code></pre>
<h3 id="heading-list-images">List Images :</h3>
<p>List all Docker images:</p>
<pre><code class="lang-bash">docker images
</code></pre>
<h3 id="heading-pull-image">Pull Image :</h3>
<p>Pull a Docker image from a registry:</p>
<pre><code class="lang-bash">docker pull &lt;image-name&gt;:&lt;tag&gt;
</code></pre>
<h3 id="heading-remove-image">Remove Image</h3>
<p>Remove a Docker image:</p>
<pre><code class="lang-bash">docker rmi &lt;image-name&gt;:&lt;tag&gt;
</code></pre>
<h3 id="heading-run-container">Run Container</h3>
<p>Run a container from an image:</p>
<pre><code class="lang-bash">docker run &lt;image-name&gt;:&lt;tag&gt;
</code></pre>
<p>Run a container in detached mode</p>
<pre><code class="lang-bash">docker run -d &lt;image-name&gt;:&lt;tag&gt;
</code></pre>
<h3 id="heading-list-containers">List Containers</h3>
<p>List all running containers:</p>
<pre><code class="lang-bash">docker ps
</code></pre>
<p>List all containers (including stopped ones):</p>
<pre><code class="lang-bash">docker ps -a
</code></pre>
<h3 id="heading-stop-container">Stop Container</h3>
<p>Stop a running container:</p>
<pre><code class="lang-bash">docker stop &lt;container-id&gt;
</code></pre>
<h3 id="heading-remove-container">Remove Container</h3>
<p>Remove a stopped container:</p>
<pre><code class="lang-bash">docker rm &lt;container-id&gt;
</code></pre>
<p>Remove a running container:</p>
<pre><code class="lang-bash">docker rm -f &lt;container-id&gt;
</code></pre>
<h3 id="heading-exec-into-container">Exec Into Container</h3>
<p>Execute a command inside a running container interactively:</p>
<pre><code class="lang-bash">docker <span class="hljs-built_in">exec</span> -it &lt;container-id&gt; &lt;<span class="hljs-built_in">command</span>&gt;
</code></pre>
<h3 id="heading-logs">Logs</h3>
<p>Display the logs of a specific container:</p>
<pre><code class="lang-bash">docker logs &lt;container-id&gt;
</code></pre>
<h3 id="heading-network-management">Network Management</h3>
<p>List all Docker networks:</p>
<pre><code class="lang-bash">docker network ls
</code></pre>
<h3 id="heading-volume-management">Volume Management</h3>
<p>List all Docker volumes:</p>
<pre><code class="lang-bash">docker volume ls
</code></pre>
<h3 id="heading-docker-compose">Docker Compose</h3>
<p>Run containers defined in a Compose file:</p>
<pre><code class="lang-bash">docker-compose up
</code></pre>
<p>Run containers in detached mode and rebuild images:</p>
<pre><code class="lang-bash">docker-compose up -d --build
</code></pre>
<p>Stop and remove containers, networks, and volumes defined in a Compose file:</p>
<pre><code class="lang-bash">docker-compose down
</code></pre>
<p>Scale a service to the specified number of instances:</p>
<pre><code class="lang-bash">docker-compose scale &lt;service-name&gt;=&lt;num-instances&gt;
</code></pre>
<p>Validate and view the Compose file:</p>
<pre><code class="lang-bash">docker-compose config
</code></pre>
<h3 id="heading-conclusion">Conclusion</h3>
<p>In conclusion, you're now armed with the coolest Docker commands—no nonsense, just pure developer magic. Go forth and containerize like a pro! Whether you're a coding ninja or just getting started, these tricks will keep your projects sailing smoothly. Happy coding, fellow devs!</p>
]]></content:encoded></item><item><title><![CDATA[Why Setting min-width: 0 Everywhere Rocks (and When It Might Not) 🚀]]></title><description><![CDATA[Unlock layout flexibility with min-width: 0 in your CSS toolkit. Tread carefully to avoid unintended layout surprises. Enhance responsiveness, but respect default styles for a harmonious design dance.
🚀 Pros of min-width: 0 for All (*)

Flexy-Flex L...]]></description><link>https://someordinarydeveloper.com/why-setting-min-width-0-everywhere-rocks-and-when-it-might-not</link><guid isPermaLink="true">https://someordinarydeveloper.com/why-setting-min-width-0-everywhere-rocks-and-when-it-might-not</guid><category><![CDATA[CSS]]></category><category><![CDATA[min-width]]></category><category><![CDATA[pros and cons]]></category><category><![CDATA[Tailwind CSS]]></category><category><![CDATA[2024]]></category><category><![CDATA[Frontend Development]]></category><dc:creator><![CDATA[Kunal Mathur]]></dc:creator><pubDate>Thu, 11 Jan 2024 12:42:54 GMT</pubDate><enclosure url="https://cdn.hashnode.com/res/hashnode/image/stock/unsplash/ipARHaxETRk/upload/62ab28a1461a45ee3b217f5e7d2e2bac.jpeg" length="0" type="image/jpeg"/><content:encoded><![CDATA[<p>Unlock layout flexibility with <code>min-width: 0</code> in your CSS toolkit. Tread carefully to avoid unintended layout surprises. Enhance responsiveness, but respect default styles for a harmonious design dance.</p>
<h3 id="heading-pros-of-min-width-0-for-all"><strong>🚀 Pros of</strong> <code>min-width: 0</code> for All (<code>*</code>)</h3>
<ol>
<li><strong>Flexy-Flex Layouts:</strong></li>
</ol>
<p>Allow images to shrink within a flex container without overflow, ensuring adaptability and responsiveness.</p>
<pre><code class="lang-css"><span class="hljs-selector-class">.flex-container</span> {
  <span class="hljs-attribute">display</span>: flex;
  <span class="hljs-attribute">align-items</span>: center;
}

<span class="hljs-selector-class">.flex-container</span> <span class="hljs-selector-tag">img</span> {
  <span class="hljs-attribute">min-width</span>: <span class="hljs-number">0</span>;
  <span class="hljs-attribute">max-width</span>: <span class="hljs-number">100%</span>;
  <span class="hljs-attribute">height</span>: auto;
}
</code></pre>
<ol>
<li><strong>No More Overflow Drama:</strong></li>
</ol>
<p>Avoid text overflow in nested containers by setting the minimum width to zero, preventing unwanted layout issues.</p>
<pre><code class="lang-css"><span class="hljs-selector-class">.nested-container</span> {
  <span class="hljs-attribute">overflow</span>: hidden;
}

<span class="hljs-selector-class">.nested-container</span> <span class="hljs-selector-tag">p</span> {
  <span class="hljs-attribute">min-width</span>: <span class="hljs-number">0</span>;
}
</code></pre>
<ol>
<li><strong>Break Free from Width Limits:</strong></li>
</ol>
<p>Override default constraints on buttons to enhance flexibility and prevent unintended limitations in design.</p>
<pre><code class="lang-css"><span class="hljs-selector-tag">button</span> {
  <span class="hljs-attribute">min-width</span>: <span class="hljs-number">0</span>;
}
</code></pre>
<ol>
<li><strong>Browser BFF Vibes:</strong></li>
</ol>
<p>Ensure consistent behavior for list items by setting a minimum width, promoting uniformity across various browsers.</p>
<pre><code class="lang-css"><span class="hljs-selector-tag">li</span> {
  <span class="hljs-attribute">min-width</span>: <span class="hljs-number">0</span>;
}
</code></pre>
<h3 id="heading-cons"><strong>🚨 Cons:</strong></h3>
<ol>
<li><strong>Unintended Surprises:</strong></li>
</ol>
<p>Apply cautiously globally, as it may unintentionally impact specific layouts, potentially causing unforeseen issues.</p>
<pre><code class="lang-css"><span class="hljs-selector-class">.specific-element</span> {
  <span class="hljs-comment">/* Specific styles */</span>
}

* {
  <span class="hljs-attribute">min-width</span>: <span class="hljs-number">0</span>; <span class="hljs-comment">/* Caution: May impact layout of '.specific-element' */</span>
}
</code></pre>
<ol>
<li><strong>Accessibility Speed Bump:</strong></li>
</ol>
<p>Exercise caution with long text content; setting the minimum width to zero may affect readability for users with accessibility needs.</p>
<pre><code class="lang-css"><span class="hljs-selector-tag">p</span> {
  <span class="hljs-attribute">min-width</span>: <span class="hljs-number">0</span>; <span class="hljs-comment">/* Caution: Consider readability for long text content */</span>
}
</code></pre>
<ol>
<li><strong>Design Clash Alert:</strong></li>
</ol>
<p>Be mindful of conflicts with designed layouts, like cards; setting a global minimum width may disrupt intended designs.</p>
<pre><code class="lang-css"><span class="hljs-selector-class">.card</span> {
  <span class="hljs-attribute">min-width</span>: <span class="hljs-number">300px</span>; <span class="hljs-comment">/* Original design intention */</span>
}

* {
  <span class="hljs-attribute">min-width</span>: <span class="hljs-number">0</span>; <span class="hljs-comment">/* Caution: May conflict with '.card' layout */</span>
}
</code></pre>
<ol>
<li><strong>CSS Puzzles Ahead:</strong></li>
</ol>
<p>Global application increases CSS complexity, potentially complicating maintenance efforts; consider targeted applications for improved manageability.</p>
<pre><code class="lang-css">* {
  <span class="hljs-attribute">min-width</span>: <span class="hljs-number">0</span>; <span class="hljs-comment">/* Caution: Increases CSS maintenance complexity */</span>
}
</code></pre>
<ol>
<li><strong>Performance Tidbit:</strong></li>
</ol>
<p>Excessive use of performance-critical elements may impact rendering speed; use judiciously to avoid unnecessary performance degradation.</p>
<pre><code class="lang-css"><span class="hljs-selector-class">.performance-critical-element</span> {
  <span class="hljs-attribute">min-width</span>: <span class="hljs-number">0</span>; <span class="hljs-comment">/* Caution: Excessive use may impact rendering performance */</span>
}
</code></pre>
<h2 id="heading-conclusion">Conclusion</h2>
<p>In the wild world of frontend dev, setting <code>min-width: 0</code> can be your ally for flexible layouts. But, like any superhero power, use it wisely! Watch out for unintended layout havoc and accessibility challenges. Stay flexible, keep testing, and know when to let the default styles shine. 🚀✨</p>
<p>credit: https://twitter.com/adamwathan/status/1734696245015494711</p>
]]></content:encoded></item><item><title><![CDATA[How To Use The Git Branches]]></title><description><![CDATA[In simple terms, a git branch is a way to create a copy of your code at a certain point in time, so that you can work on new features or make changes without affecting the original code. It's like creating a new "branch" in a tree - the main trunk of...]]></description><link>https://someordinarydeveloper.com/how-to-use-the-git-branches</link><guid isPermaLink="true">https://someordinarydeveloper.com/how-to-use-the-git-branches</guid><category><![CDATA[GitHub]]></category><category><![CDATA[Developer]]></category><category><![CDATA[Git]]></category><category><![CDATA[tips]]></category><dc:creator><![CDATA[Kunal Mathur]]></dc:creator><pubDate>Fri, 24 Feb 2023 18:30:39 GMT</pubDate><enclosure url="https://cdn.hashnode.com/res/hashnode/image/stock/unsplash/CQc0GaSjxjQ/upload/83af23e9966ba662df686f22feb1ac61.jpeg" length="0" type="image/jpeg"/><content:encoded><![CDATA[<p>In simple terms, a git branch is a way to create a copy of your code at a certain point in time, so that you can work on new features or make changes without affecting the original code. It's like creating a new "branch" in a tree - the main trunk of the tree (your original code) remains intact, while you can make changes and additions on the new branch (your new code).</p>
<p>Each branch has a unique name, and you can switch between branches to work on different parts of your code. When you're finished making changes on a branch, you can merge those changes back into the main branch (also known as the "master" branch) so that they become part of the main codebase.</p>
<p>Using branches is a common practice in software development, as it allows multiple people to work on the same codebase simultaneously without interfering with each other's work. It also helps to keep the code organized and makes it easier to track changes and revert back to previous versions if necessary.</p>
<h3 id="heading-best-way-to-use-git-branches">Best way to use git branches</h3>
<p><mark>Quick tip create branches with "feature/task-you-are-working-on"</mark></p>
<p>There is no one-size-fits-all answer to the best way to use Git branches, as it depends on your specific workflow and project requirements. However, here are some general tips that can help you use branches effectively:</p>
<ol>
<li><p>Use descriptive branch names: Give your branches meaningful names that describe the changes you're making, such as "feature/user-authentication" or "bugfix/404-page".</p>
</li>
<li><p>Create branches for specific tasks: Create a new branch for each task or feature you're working on, rather than making changes directly to the main branch. This will help you keep track of changes and isolate any issues that arise.</p>
</li>
<li><p>Use feature branches: Consider using a "feature branch" workflow, where each branch corresponds to a specific feature or set of related features. This can make it easier to manage changes and collaborate with other developers.</p>
</li>
<li><p>Use pull requests for code review: When you're finished making changes on a branch, submit a pull request to merge your changes into the main branch. This allows others to review your code and provide feedback before it's merged.</p>
</li>
<li><p>Delete branches when they're no longer needed: Once a branch has been merged into the main branch and is no longer needed, delete it to keep your repository clean and organized.</p>
</li>
<li><p>Use tags for releases: When you're ready to release a new version of your software, consider using Git tags to mark the specific commit that corresponds to that release. This can help you easily track which version of the code was used for a particular release.</p>
</li>
</ol>
<p>Overall, the key to using Git branches effectively is to stay organized, communicate clearly with your team, and follow consistent workflows that work for your project</p>
]]></content:encoded></item><item><title><![CDATA[How To Add SSL Certificate on Centos 8]]></title><description><![CDATA[Why We Need SSL?
SSL certificates are required for websites in order to protect user data, validate website ownership, prevent attackers from creating a false version of the site, and transmit trust to users. 
What is Certbot?
Certbot is a free, open...]]></description><link>https://someordinarydeveloper.com/how-to-add-ssl-certificate-on-centos-8</link><guid isPermaLink="true">https://someordinarydeveloper.com/how-to-add-ssl-certificate-on-centos-8</guid><category><![CDATA[SSL]]></category><category><![CDATA[apache]]></category><category><![CDATA[centos]]></category><category><![CDATA[Linux]]></category><category><![CDATA[AWS]]></category><dc:creator><![CDATA[Kunal Mathur]]></dc:creator><pubDate>Tue, 14 Feb 2023 18:30:39 GMT</pubDate><enclosure url="https://cdn.hashnode.com/res/hashnode/image/stock/unsplash/ZVkDLrXGMdw/upload/5aaa82762a2dc5715ec22a1d9cd8fc9c.jpeg" length="0" type="image/jpeg"/><content:encoded><![CDATA[<h3 id="heading-why-we-need-ssl"><strong>Why We Need SSL?</strong></h3>
<p>SSL certificates are required for websites in order to protect user data, validate website ownership, prevent attackers from creating a false version of the site, and transmit trust to users. </p>
<h3 id="heading-what-is-certbot"><strong>What is Certbot?</strong></h3>
<p>Certbot is a free, open-source software tool for automatically using <a target="_blank" href="https://letsencrypt.org/">Let’s Encrypt</a> certificates on manually-administrated websites to enable HTTPS.</p>
<p>source: <a target="_blank" href="https://certbot.eff.org/pages/about">certbot</a></p>
<h3 id="heading-prerequisites"><strong>Prerequisites</strong></h3>
<ul>
<li><p>Server with CentOS 8</p>
</li>
<li><p>Apache is installed on the server with the configured virtual host for your domains.</p>
</li>
</ul>
<h3 id="heading-step-1-installing-the-certbot-client"><strong>Step 1 - Installing the Certbot Client</strong></h3>
<p>Add the CentOS 8 EPEL repository</p>
<pre><code class="lang-bash">$ sudo dnf install epel-release
</code></pre>
<p>Now Install Certbot with the required packages <code>python3-certbot-apache</code> and <code>mod_ssl</code></p>
<pre><code class="lang-bash">$ sudo dnf install certbot python3-certbot-apache mod_ssl
</code></pre>
<h3 id="heading-step-2-getting-a-certificate"><strong>Step 2 - Getting a Certificate</strong></h3>
<p>To obtain a certificate that covers only one domain</p>
<pre><code class="lang-bash">$ sudo certbot --apache -d example.com
</code></pre>
<p>To obtain a certificate that covers multiple domains</p>
<pre><code class="lang-bash">$ sudo certbot --apache -d www.example.com -d example.com
</code></pre>
<p>You can also use <code>certbot</code> utility prompt</p>
<pre><code class="lang-bash">$ sudo certbot --apache
</code></pre>
<p><em>#Output</em></p>
<p>Successful Installation output will be something similar to this</p>
<pre><code class="lang-plaintext">IMPORTANT NOTES:
 - Congratulations! Your certificate and chain have been saved at:
   /etc/letsencrypt/live/example.com/fullchain.pem
   Your key file has been saved at:
   /etc/letsencrypt/live/example.com/privkey.pem
   Your cert will expire on 2022-01-26. To obtain a new or tweaked
   version of this certificate in the future, simply run certbot again
   with the "certonly" option. To non-interactively renew *all* of
   your certificates, run "certbot renew"
 - Your account credentials have been saved in your Certbot
   configuration directory at /etc/letsencrypt. You should make a
   secure backup of this folder now. This configuration directory will
   also contain certificates and private keys obtained by Certbot so
   making regular backups of this folder is ideal.
 - If you like Certbot, please consider supporting our work by:

   Donating to ISRG / Let's Encrypt:   https://letsencrypt.org/donate
   Donating to E
</code></pre>
<pre><code class="lang-plaintext">FF:                    https://eff.org/donate-le
</code></pre>
<h3 id="heading-step-3-testing"><strong>Step 3 - Testing</strong></h3>
<pre><code class="lang-plaintext">https://www.ssllabs.com/ssltest/analyze.html?d=example.com
</code></pre>
<h2 id="heading-conclusion">Conclusion</h2>
<p>We learned how to install a free SSL certificate on your domain in a very basic and straightforward manner.</p>
]]></content:encoded></item><item><title><![CDATA[AWS LightSail CI / CD]]></title><description><![CDATA[Prerequisites

Project on GitHub (in this tutorial I’m using the Next js application).

Server SSH private key (the key you create while creating a new instance).


Step 1 - Create GitHub Action secrets
We need 3 Action secrets AWS_USERNAME AWS_HOSTN...]]></description><link>https://someordinarydeveloper.com/aws-lightsail-ci-cd</link><guid isPermaLink="true">https://someordinarydeveloper.com/aws-lightsail-ci-cd</guid><category><![CDATA[AWS]]></category><category><![CDATA[ci-cd]]></category><category><![CDATA[React]]></category><category><![CDATA[automation]]></category><category><![CDATA[server]]></category><dc:creator><![CDATA[Kunal Mathur]]></dc:creator><pubDate>Mon, 13 Feb 2023 18:30:39 GMT</pubDate><enclosure url="https://cdn.hashnode.com/res/hashnode/image/stock/unsplash/qafbp6O0Rr0/upload/efebefad680d7550e167ca6e9d056c25.jpeg" length="0" type="image/jpeg"/><content:encoded><![CDATA[<h2 id="heading-prerequisites">Prerequisites</h2>
<ul>
<li><p>Project on GitHub (in this tutorial I’m using the Next js application).</p>
</li>
<li><p>Server SSH private key (the key you create while creating a new instance).</p>
</li>
</ul>
<h2 id="heading-step-1-create-github-action-secrets">Step 1 - Create GitHub Action secrets</h2>
<p>We need 3 Action secrets <code>AWS_USERNAME</code> <code>AWS_HOSTNAME</code> <code>AWS_PRIVATE_KEY</code></p>
<ul>
<li><p>Navigate to the main page of the repository.</p>
</li>
<li><p>Click on the Setting Tab (top right area).</p>
</li>
<li><p>Select Action under “Secrets”</p>
</li>
<li><p>Click on the “New repository secret” button (top right area)</p>
</li>
<li><p>Set Name to “<code>AWS_PRIVATE_KEY</code>".</p>
</li>
<li><p>Paste the content of the server SSH private key and remove <code>----BEGIN RSA PRIVATE KEY---—</code> and <code>----END RSA PRIVATE KEY---—</code></p>
</li>
<li><p>Click on “Add secret”</p>
</li>
<li><p>follow the above point to add further “action secrets”</p>
</li>
<li><p>Set <code>AWS_USERNAME</code> value to your Linux users (most commonly centos, apache2) you can use <code>whoami</code> command to get your current user name.</p>
</li>
<li><p>Set <code>AWS_HOSTNAME</code> value to your server IP address.</p>
</li>
</ul>
<p><mark>You can also add any ENV variable as Action secrets by following the same guide above.</mark></p>
<h2 id="heading-step-2-setup-workflows">Step 2 - Setup Workflows</h2>
<p>This is the part where all magic happens</p>
<ul>
<li><p>Create folders in your project repository <code>my-cool-app/.github/workflows</code></p>
</li>
<li><p>Set up your workflow by creating two <code>.yml</code> files. For the sake of simplicity, we named it <code>build.yml</code> and <code>deploy.yml</code>. </p>
</li>
</ul>
<p><em>#build.yml</em></p>
<pre><code class="lang-yml"><span class="hljs-attr">name:</span> <span class="hljs-string">build</span>

<span class="hljs-attr">on:</span>
    <span class="hljs-attr">push:</span>
    <span class="hljs-attr">branches:</span> [ <span class="hljs-string">main</span> ]
  <span class="hljs-attr">pull_request:</span>
    <span class="hljs-attr">branches:</span> [ <span class="hljs-string">main</span> ]
  <span class="hljs-attr">workflow_dispatch:</span>

<span class="hljs-attr">jobs:</span>
  <span class="hljs-attr">build:</span>
    <span class="hljs-attr">runs-on:</span> <span class="hljs-string">ubuntu-latest</span>

    <span class="hljs-attr">strategy:</span>
      <span class="hljs-attr">matrix:</span>
        <span class="hljs-attr">node-version:</span> [<span class="hljs-number">16.</span><span class="hljs-string">x</span>]
        <span class="hljs-comment"># See supported Node.js release schedule at https://nodejs.org/en/about/releases/</span>

    <span class="hljs-attr">steps:</span>
    <span class="hljs-bullet">-</span> <span class="hljs-attr">uses:</span> <span class="hljs-string">actions/checkout@v2</span>
    <span class="hljs-bullet">-</span> <span class="hljs-attr">name:</span> <span class="hljs-string">Use</span> <span class="hljs-string">Node.js</span> <span class="hljs-string">${{</span> <span class="hljs-string">matrix.node-version</span> <span class="hljs-string">}}</span>
      <span class="hljs-attr">uses:</span> <span class="hljs-string">actions/setup-node@v2</span>
      <span class="hljs-attr">with:</span>
        <span class="hljs-attr">node-version:</span> <span class="hljs-string">${{</span> <span class="hljs-string">matrix.node-version</span> <span class="hljs-string">}}</span>
        <span class="hljs-attr">cache:</span> <span class="hljs-string">'npm'</span>
    <span class="hljs-bullet">-</span> <span class="hljs-attr">run:</span> <span class="hljs-string">npm</span> <span class="hljs-string">ci</span>
    <span class="hljs-bullet">-</span> <span class="hljs-attr">run:</span> <span class="hljs-string">npm</span> <span class="hljs-string">run</span> <span class="hljs-string">build</span>
      <span class="hljs-attr">env:</span>
        <span class="hljs-attr">NEXT_PUBLIC_API_URL:</span> <span class="hljs-string">${{</span> <span class="hljs-string">secrets.NEXT_PUBLIC_API_URL</span> <span class="hljs-string">}}</span>
</code></pre>
<p>Add env variable under <code>env:</code> if any.</p>
<p><em>#deploy.yml</em></p>
<pre><code class="lang-yml"><span class="hljs-attr">name:</span> <span class="hljs-string">deploy</span>

<span class="hljs-attr">on:</span>
  <span class="hljs-attr">push:</span>
    <span class="hljs-attr">branches:</span>
      <span class="hljs-bullet">-</span> <span class="hljs-string">main</span>
  <span class="hljs-attr">workflow_dispatch:</span>  

<span class="hljs-attr">jobs:</span>
  <span class="hljs-attr">deploy:</span>
      <span class="hljs-attr">needs:</span> [<span class="hljs-string">build</span>]  <span class="hljs-comment"># require build to pass before deploy runs</span>
    <span class="hljs-attr">name:</span> <span class="hljs-string">Deploy</span>
    <span class="hljs-attr">runs-on:</span> <span class="hljs-string">ubuntu-latest</span>
    <span class="hljs-attr">environment:</span> <span class="hljs-string">production</span>

    <span class="hljs-attr">steps:</span>
    <span class="hljs-bullet">-</span> <span class="hljs-attr">name:</span> <span class="hljs-string">Checkout</span>
      <span class="hljs-attr">uses:</span> <span class="hljs-string">actions/checkout@v2</span>

    <span class="hljs-bullet">-</span> <span class="hljs-attr">name:</span> <span class="hljs-string">SSH</span> <span class="hljs-string">to</span> <span class="hljs-string">Host</span>
      <span class="hljs-attr">env:</span>
        <span class="hljs-attr">AWS_PRIVATE_KEY:</span> <span class="hljs-string">${{</span> <span class="hljs-string">secrets.AWS_PRIVATE_KEY</span>  <span class="hljs-string">}}</span>
        <span class="hljs-attr">AWS_HOSTNAME:</span> <span class="hljs-string">${{</span> <span class="hljs-string">secrets.AWS_HOSTNAME</span> <span class="hljs-string">}}</span>
        <span class="hljs-attr">AWS_USERNAME :</span> <span class="hljs-string">${{</span> <span class="hljs-string">secrets.AWS_USERNAME</span>  <span class="hljs-string">}}</span>

      <span class="hljs-attr">run:</span> <span class="hljs-string">|
          echo "$AWS_PRIVATE_KEY" &gt; private_key &amp;&amp; chmod 600 private_key
          ssh -o StrictHostKeyChecking=no -i private_key ${AWS_USERNAME}@${AWS_HOSTNAME} '
</span>
            <span class="hljs-comment"># 📌 Start your instance/server related tasks form here.</span>
            <span class="hljs-comment"># 1</span>
            <span class="hljs-string">cat</span> <span class="hljs-string">whereami.txt</span>
            <span class="hljs-comment"># 2</span>
            <span class="hljs-string">bash</span> <span class="hljs-string">~/scripts/my-app-deploy.sh</span>
          <span class="hljs-string">'</span>
</code></pre>
<p>#1</p>
<p>Tip: Create <code>whereami.txt</code> a file on your server to test out the connection.</p>
<p>#2</p>
<p>You can run your <code>.sh</code> file stored on your LightSail server, the script will contain all the required commands to build and start your application.</p>
<p><em>#</em><a target="_blank" href="http://my-app-deploy.sh"><em>my-app-deploy.sh</em></a></p>
<pre><code class="lang-bash">pm2 stop my-app

git pull

npm install

npm run build
</code></pre>
<pre><code class="lang-bash">
pm2 start my-app

<span class="hljs-built_in">echo</span> <span class="hljs-string">"my-app-deploy script executed"</span>
</code></pre>
<h3 id="heading-wth-is-pm2"><strong>WTH is pm2?</strong></h3>
<p>it is a production process manager for Node.js applications with a built-in load balancer.</p>
]]></content:encoded></item><item><title><![CDATA[How to set up a Laravel project from Git]]></title><description><![CDATA[First clone the repository
git clone -b <BRANCH_NAME> <REPO_URL> <FOLDER_NAME>

Install required packages
composer install --no-scripts

composer install --optimize-autoloader

If required*
npm install

Change dir permission
sudo chmod 777 -R bootstr...]]></description><link>https://someordinarydeveloper.com/how-to-set-up-a-laravel-project-from-git</link><guid isPermaLink="true">https://someordinarydeveloper.com/how-to-set-up-a-laravel-project-from-git</guid><category><![CDATA[Laravel]]></category><category><![CDATA[Git]]></category><category><![CDATA[setup]]></category><category><![CDATA[server]]></category><category><![CDATA[Deploy ]]></category><dc:creator><![CDATA[Kunal Mathur]]></dc:creator><pubDate>Sun, 12 Feb 2023 18:30:39 GMT</pubDate><enclosure url="https://cdn.hashnode.com/res/hashnode/image/stock/unsplash/Y5yxdx2a4PI/upload/2d86163f7ad9c319ac227a03d987fa2a.jpeg" length="0" type="image/jpeg"/><content:encoded><![CDATA[<h3 id="heading-first-clone-the-repository">First clone the repository</h3>
<pre><code class="lang-bash">git <span class="hljs-built_in">clone</span> -b &lt;BRANCH_NAME&gt; &lt;REPO_URL&gt; &lt;FOLDER_NAME&gt;
</code></pre>
<h3 id="heading-install-required-packages">Install required packages</h3>
<pre><code class="lang-bash">composer install --no-scripts
</code></pre>
<pre><code class="lang-bash">composer install --optimize-autoloader
</code></pre>
<p><em>If required*</em></p>
<pre><code class="lang-bash">npm install
</code></pre>
<h3 id="heading-change-dir-permission">Change dir permission</h3>
<pre><code class="lang-bash">sudo chmod 777 -R bootstrap
</code></pre>
<pre><code class="lang-bash">sudo chmod 777 -R storage
</code></pre>
<h3 id="heading-create-env">Create .env</h3>
<pre><code class="lang-bash">mv .env.example .env
</code></pre>
<h3 id="heading-generate-new-key">Generate new key</h3>
<pre><code class="lang-bash">php artisan key:generate
</code></pre>
<h3 id="heading-link-storage">Link storage</h3>
<pre><code class="lang-bash">php artisan storage:link
</code></pre>
<h3 id="heading-clear-cache-and-optimize">Clear cache and optimize</h3>
<pre><code class="lang-bash">php artisan optimize:clear
</code></pre>
<pre><code class="lang-bash">php artisan optimize
</code></pre>
<h3 id="heading-how-to-run-local">How to run (local)</h3>
<pre><code class="lang-bash">php artisan server --port=8000
</code></pre>
]]></content:encoded></item><item><title><![CDATA[How to deploy Next js application on any Linux server]]></title><description><![CDATA[Prerequisite :

Linux Server,  I'm using AWS Lightsail Linux (centos 8) server

Next js application in the GitHub repo.

Node & Apache pre-install and setup


I'm assuming you've previously met all of the prerequisites.
Step 1 - Clone your repo in yo...]]></description><link>https://someordinarydeveloper.com/how-to-deploy-next-js-application-on-any-linux-server</link><guid isPermaLink="true">https://someordinarydeveloper.com/how-to-deploy-next-js-application-on-any-linux-server</guid><category><![CDATA[Next.js]]></category><category><![CDATA[Node.js]]></category><category><![CDATA[deployment]]></category><category><![CDATA[Linux]]></category><category><![CDATA[server]]></category><dc:creator><![CDATA[Kunal Mathur]]></dc:creator><pubDate>Sat, 11 Feb 2023 18:43:45 GMT</pubDate><enclosure url="https://cdn.hashnode.com/res/hashnode/image/upload/v1676141165867/463defae-60b2-42cb-8d03-7c3765a73dbf.png" length="0" type="image/jpeg"/><content:encoded><![CDATA[<h3 id="heading-prerequisite"><strong>Prerequisite :</strong></h3>
<ul>
<li><p>Linux Server,  I'm using AWS Lightsail Linux (centos 8) server</p>
</li>
<li><p>Next js application in the GitHub repo.</p>
</li>
<li><p>Node &amp; Apache pre-install and setup</p>
</li>
</ul>
<p>I'm assuming you've previously met all of the prerequisites.</p>
<h3 id="heading-step-1-clone-your-repo-in-your-domain-root-directory"><strong>Step 1 - Clone your repo in your domain root directory</strong></h3>
<p>NOTE: You can configure your domain and its root directory how you want.</p>
<pre><code class="lang-bash">git <span class="hljs-built_in">clone</span> my-next-app:username/my-next-app.git
</code></pre>
<h3 id="heading-step-2-install-pm2"><strong>Step 2 - Install PM2</strong></h3>
<p>if you are wondering what is PM2, it is a production process manager for Node.js applications with a built-in load balancer.</p>
<p>for more information, you can check out their site <a target="_blank" href="https://pm2.keymetrics.io/">here</a>.</p>
<pre><code class="lang-bash">sudo npm install -g pm2
</code></pre>
<p><mark>“-g” to install pm2 globally </mark> </p>
<h3 id="heading-step-3-build-and-start-your-next-js-application"><strong>Step 3 - Build and Start your Next js Application</strong></h3>
<p>cd into your project directory e.g “/my-next-app”</p>
<p>Run Build Command</p>
<pre><code class="lang-bash">npm run build
</code></pre>
<pre><code class="lang-bash">pm2 start npm --name <span class="hljs-string">"my-next-app"</span> -- start
</code></pre>
<h3 id="heading-step-4-open-port-andamp-setup"><strong>Step 4 - Open Port &amp; Setup</strong></h3>
<pre><code class="lang-bash">firewall-cmd --zone=public --add-port=3000/tcp --permanent
</code></pre>
<pre><code class="lang-bash">firewall-cmd --reload
</code></pre>
<pre><code class="lang-bash">/usr/sbin/setsebool httpd_can_network_connect <span class="hljs-literal">true</span>
//OR
/usr/sbin/setsebool httpd_can_network_connect 1
</code></pre>
<p><mark>To make the changes persist. Use “-P”</mark></p>
<pre><code class="lang-bash">/usr/sbin/setsebool -P httpd_can_network_connect 1
</code></pre>
<p>Now Restart your Apache server</p>
<pre><code class="lang-bash">service httpd restart
</code></pre>
<h3 id="heading-step-5-make-a-few-changes-to-the-your-domainconf-file"><strong>Step 5 - Make a few changes to the “your-domain.conf” file</strong></h3>
<p><strong>Port 80 :</strong></p>
<pre><code class="lang-apache"><span class="hljs-section">&lt;VirtualHost *<span class="hljs-number">:80</span>&gt;</span>
    ...
    <span class="hljs-attribute">ProxyRequests</span> <span class="hljs-literal">Off</span>
    <span class="hljs-attribute">ProxyPreserveHost</span> <span class="hljs-literal">On</span>
    <span class="hljs-attribute">ProxyVia</span> Full

    <span class="hljs-section">&lt;Proxy *&gt;</span>
        <span class="hljs-attribute">Require</span> <span class="hljs-literal">all</span> granted
    <span class="hljs-section">&lt;/Proxy&gt;</span>

    <span class="hljs-attribute">ProxyPass</span> / http://<span class="hljs-number">127.0.0.1:3000</span>/
    <span class="hljs-attribute">ProxyPassReverse</span> / http://<span class="hljs-number">127.0.0.1:3000</span>/
    ...
<span class="hljs-section">&lt;/VirtualHost&gt;</span>
</code></pre>
<p><strong>Port 443 :</strong></p>
<pre><code class="lang-apache"><span class="hljs-section">&lt;VirtualHost *<span class="hljs-number">:443</span>&gt;</span>
    ...
    <span class="hljs-attribute">ProxyPreserveHost</span> <span class="hljs-literal">on</span>
    <span class="hljs-attribute">ProxyPass</span> / http://localhost:<span class="hljs-number">3000</span>/
    <span class="hljs-attribute">ProxyPassReverse</span> / http://localhost:<span class="hljs-number">3000</span>/
    <span class="hljs-attribute">LogLevel</span> warn
   ...
<span class="hljs-section">&lt;/VirtualHost&gt;</span>
</code></pre>
<p>Restart your Apache server</p>
<pre><code class="lang-bash">service httpd restart
</code></pre>
<p>YAY ! 🥳 Visit your site and access your Next js application</p>
<h3 id="heading-troubleshooting"><strong>⚙ Troubleshooting</strong></h3>
<p>If you get an error, make sure you follow each step exactly. Moreover, if you continue to encounter problems, consider the solutions listed below. </p>
<p>Site Throwing 503</p>
<ul>
<li><p>Make sure there is no error occurring on build and run time</p>
</li>
<li><p>Check if the application is running</p>
</li>
</ul>
<pre><code class="lang-bash">pm2 show my-next-app

//OR

pm2 monit
</code></pre>
<ul>
<li><p>The port on which your application is running is open and accessible, in my case it was 3000 (checkout <strong>Step 4</strong>)</p>
</li>
<li><p>Run the following command to check open and running ports</p>
</li>
</ul>
<pre><code class="lang-bash">netstat -tulpn | grep LISTEN
</code></pre>
<ul>
<li>Restart your instance manually, Go to your server management panel and restart your server, and re-run <strong>Step 3</strong> and <strong>Step 4</strong></li>
</ul>
<p>In the end, if the given solution doesn't work for you then like a PRO Google 😎 it.</p>
]]></content:encoded></item></channel></rss>