<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:dc="http://purl.org/dc/elements/1.1/">
  <channel>
    <title>DEV Community: Brent Vanwildemeersch</title>
    <description>The latest articles on DEV Community by Brent Vanwildemeersch (@vanwildemeerschbrent).</description>
    <link>https://dev.to/vanwildemeerschbrent</link>
    <image>
      <url>https://media2.dev.to/dynamic/image/width=90,height=90,fit=cover,gravity=auto,format=auto/https:%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Fuser%2Fprofile_image%2F307618%2F4ff1da48-4f46-4a9f-aa92-cce586ba6194.jpeg</url>
      <title>DEV Community: Brent Vanwildemeersch</title>
      <link>https://dev.to/vanwildemeerschbrent</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/vanwildemeerschbrent"/>
    <language>en</language>
    <item>
      <title>How to change your PHP version on Ubuntu 22.04</title>
      <dc:creator>Brent Vanwildemeersch</dc:creator>
      <pubDate>Tue, 10 Jan 2023 18:25:07 +0000</pubDate>
      <link>https://dev.to/vanwildemeerschbrent/changing-php-versions-on-ubuntu-2204-if5</link>
      <guid>https://dev.to/vanwildemeerschbrent/changing-php-versions-on-ubuntu-2204-if5</guid>
      <description>&lt;h3&gt;
  
  
  Info
&lt;/h3&gt;

&lt;p&gt;This is a guide to change your PHP version through the command line on Ubuntu 22.04&lt;/p&gt;

&lt;h3&gt;
  
  
  Installed versions list
&lt;/h3&gt;

&lt;p&gt;To list all the installed PHP versions on your local device, use the following command :&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;&lt;span class="nb"&gt;sudo &lt;/span&gt;update-alternatives &lt;span class="nt"&gt;--config&lt;/span&gt; php
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h3&gt;
  
  
  Change active PHP version
&lt;/h3&gt;

&lt;p&gt;To change your currently used PHP version to a different version (that is installed), you can use the following command:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;&lt;span class="nb"&gt;sudo &lt;/span&gt;update-alternatives &lt;span class="nt"&gt;--set&lt;/span&gt; php /usr/bin/php&lt;span class="k"&gt;${&lt;/span&gt;&lt;span class="nv"&gt;version&lt;/span&gt;&lt;span class="k"&gt;}&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



</description>
      <category>aws</category>
      <category>netlify</category>
      <category>vercel</category>
      <category>webdev</category>
    </item>
    <item>
      <title>Enable hibernate on Ubuntu 20.04</title>
      <dc:creator>Brent Vanwildemeersch</dc:creator>
      <pubDate>Fri, 09 Sep 2022 17:16:09 +0000</pubDate>
      <link>https://dev.to/vanwildemeerschbrent/how-to-enable-suspendhibernate-when-closing-lid-on-ubuntu-2004-3g8e</link>
      <guid>https://dev.to/vanwildemeerschbrent/how-to-enable-suspendhibernate-when-closing-lid-on-ubuntu-2004-3g8e</guid>
      <description>&lt;p&gt;Source : &lt;a href="https://ubuntuhandbook.org/index.php/2020/05/lid-close-behavior-ubuntu-20-04/"&gt;How to Change Lid Close Behavior in Ubuntu 20.04&lt;/a&gt;&lt;/p&gt;

&lt;h3&gt;
  
  
  1. Open a new shell session
&lt;/h3&gt;

&lt;h3&gt;
  
  
  2. Run command to open file
&lt;/h3&gt;

&lt;p&gt;&lt;code&gt;sudo gedit /etc/systemd/logind.conf&lt;/code&gt;&lt;/p&gt;

&lt;h3&gt;
  
  
  3. Edit the file to enable hibernate on closing lid
&lt;/h3&gt;

&lt;p&gt;When the file is opened, search for the following line&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;&lt;span class="c"&gt;#HandleLidSwitch=suspend&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;remove the &lt;code&gt;#&lt;/code&gt; to enable the setting and save the changed document&lt;/p&gt;

&lt;p&gt;&lt;em&gt;You can also choose one of the following options if suspend is not what you are looking for&lt;/em&gt;&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;&lt;span class="nv"&gt;HandleLidSwitch&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;lock – lock when lid closed.
&lt;span class="nv"&gt;HandleLidSwitch&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;ignore – &lt;span class="k"&gt;do &lt;/span&gt;nothing.
&lt;span class="nv"&gt;HandleLidSwitch&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;poweroff – shutdown.
&lt;span class="nv"&gt;HandleLidSwitch&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;hibernate – hibernate Ubuntu.
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h3&gt;
  
  
  4. Apply the changes
&lt;/h3&gt;

&lt;p&gt;Apply the changes by restarting the service&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;systemctl restart systemd-logind.service
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Your system should suspend/hibernate now when you close the lid of your laptop&lt;/p&gt;




&lt;p&gt;If you want to verify if the option you chose is available on your device you can run&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;&lt;span class="nb"&gt;sudo &lt;/span&gt;systemctl hibernate/suspend/lock
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



</description>
      <category>linux</category>
      <category>ubuntu</category>
      <category>hibernate</category>
    </item>
    <item>
      <title>How to set default NVM version for all Linux shells</title>
      <dc:creator>Brent Vanwildemeersch</dc:creator>
      <pubDate>Mon, 22 Aug 2022 17:25:00 +0000</pubDate>
      <link>https://dev.to/vanwildemeerschbrent/linux-set-default-nvm-version-for-all-terminals-cgf</link>
      <guid>https://dev.to/vanwildemeerschbrent/linux-set-default-nvm-version-for-all-terminals-cgf</guid>
      <description>&lt;p&gt;After installing &lt;a href="https://github.com/nvm-sh/nvm"&gt;NVM&lt;/a&gt; and setting up a nvm version using:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;nvm use &lt;span class="k"&gt;${&lt;/span&gt;&lt;span class="nv"&gt;NODE_VERSION_NUMBER&lt;/span&gt;&lt;span class="k"&gt;}&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;I realized that not every shell I started had the &lt;code&gt;NODE_VERSION_NUMBER&lt;/code&gt; that I had set earlier&lt;/p&gt;

&lt;p&gt;Setting a default node version using NVM on Linux for all shells/terminals can be done using the following command.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;nvm &lt;span class="nb"&gt;alias &lt;/span&gt;default &lt;span class="k"&gt;${&lt;/span&gt;&lt;span class="nv"&gt;NODE_VERSION_NUMBER&lt;/span&gt;&lt;span class="k"&gt;}&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Restarting the terminall/shell will now have the correct &lt;code&gt;NODE_VERSION_NUMBER&lt;/code&gt; set for NVM&lt;/p&gt;

</description>
      <category>linux</category>
      <category>nvm</category>
      <category>node</category>
    </item>
    <item>
      <title>Fix Microsoft Teams screen sharing on Ubuntu 22.04</title>
      <dc:creator>Brent Vanwildemeersch</dc:creator>
      <pubDate>Sun, 07 Aug 2022 11:23:00 +0000</pubDate>
      <link>https://dev.to/vanwildemeerschbrent/fix-microsoft-teams-screen-sharing-on-ubuntu-2204-2f0i</link>
      <guid>https://dev.to/vanwildemeerschbrent/fix-microsoft-teams-screen-sharing-on-ubuntu-2204-2f0i</guid>
      <description>&lt;h3&gt;
  
  
  Problem
&lt;/h3&gt;

&lt;p&gt;When you install &lt;a href="https://www.microsoft.com/nl-be/microsoft-teams/download-app#desktopAppDownloadregion" rel="noopener noreferrer"&gt;Microsoft Teams&lt;/a&gt; on Linux Ubunut 22.04, screen/desktop sharing doesn't work (v1.5.00.10453)&lt;br&gt;
When you open the sharing tray on the native or the web-client of MS teams, its empty as shown below.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F76zsbx9r2e95ijyg4un0.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F76zsbx9r2e95ijyg4un0.png" alt="Screenshot empty sharing tray MS Teams"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h3&gt;
  
  
  Cause
&lt;/h3&gt;

&lt;p&gt;The origin of this problem is that Linux Ubuntu 22.04 uses &lt;a href="https://wayland.freedesktop.org/" rel="noopener noreferrer"&gt;Wayland&lt;/a&gt; as main communication protocol between a display server and its clients. And the Elektron version that Teams is currently using doesn't support Wayland as it should.&lt;/p&gt;

&lt;h3&gt;
  
  
  Solution
&lt;/h3&gt;

&lt;p&gt;&lt;a href="https://linuxconfig.org/how-to-enable-disable-wayland-on-ubuntu-20-04-desktop" rel="noopener noreferrer"&gt;Source&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Solving the screen sharing issue is easily resolved by just disabling Wayland in your display manager&lt;/p&gt;

&lt;p&gt;Assuming GDM3 is your default display manager, editing the config can disable Wayland&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;

 sudoedit /etc/gdm3/custom.conf


&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;

&lt;p&gt;&lt;a href="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F8rg723njqlo69185j3ka.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F8rg723njqlo69185j3ka.png" alt="Image config Wayland enabled"&gt;&lt;/a&gt;&lt;br&gt;
Uncomment &lt;code&gt;#WaylandEnable=false&lt;/code&gt; and save your changes&lt;/p&gt;

&lt;p&gt;Restart your device or restart GDM3 &lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;
 bash
sudo systemctl restart gdm3


&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;

&lt;p&gt;After restart, this should resolve the issues with MS Teams screen sharing&lt;/p&gt;

</description>
      <category>linux</category>
      <category>ubuntu</category>
      <category>msteams</category>
      <category>microsoft</category>
    </item>
    <item>
      <title>Bun command not found on Linux</title>
      <dc:creator>Brent Vanwildemeersch</dc:creator>
      <pubDate>Sun, 31 Jul 2022 12:59:00 +0000</pubDate>
      <link>https://dev.to/vanwildemeerschbrent/bun-command-not-found-on-linux-4n16</link>
      <guid>https://dev.to/vanwildemeerschbrent/bun-command-not-found-on-linux-4n16</guid>
      <description>&lt;p&gt;After a clean install of &lt;a href="https://bun.sh/"&gt;bun&lt;/a&gt; on Linux, the &lt;code&gt;bun&lt;/code&gt; command will not be recognised by the commandline, because bun was not automatically added to &lt;code&gt;PATH&lt;/code&gt;&lt;/p&gt;

&lt;p&gt;It will probably return a message as following,&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;bun &lt;span class="nt"&gt;--version&lt;/span&gt;

Command &lt;span class="s1"&gt;'bun'&lt;/span&gt; not found, did you mean:

  &lt;span class="nb"&gt;command&lt;/span&gt; &lt;span class="s1"&gt;'ben'&lt;/span&gt; from deb ben &lt;span class="o"&gt;(&lt;/span&gt;0.9.0ubuntu2&lt;span class="o"&gt;)&lt;/span&gt;
  &lt;span class="nb"&gt;command&lt;/span&gt; &lt;span class="s1"&gt;'bus'&lt;/span&gt; from deb atm-tools &lt;span class="o"&gt;(&lt;/span&gt;1:2.5.1-4&lt;span class="o"&gt;)&lt;/span&gt;
  &lt;span class="nb"&gt;command&lt;/span&gt; &lt;span class="s1"&gt;'zun'&lt;/span&gt; from deb python3-zunclient &lt;span class="o"&gt;(&lt;/span&gt;4.0.0-0ubuntu1&lt;span class="o"&gt;)&lt;/span&gt;

Try: &lt;span class="nb"&gt;sudo &lt;/span&gt;apt &lt;span class="nb"&gt;install&lt;/span&gt; &amp;lt;deb name&amp;gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;You can solve this with the following actions :&lt;/p&gt;

&lt;h4&gt;
  
  
  1. Edit the &lt;code&gt;.bashrc&lt;/code&gt; file
&lt;/h4&gt;



&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;nano nano ~/.bashrc 
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h4&gt;
  
  
  2. Add the following lines at the end of your &lt;code&gt;.bashrc&lt;/code&gt; file
&lt;/h4&gt;



&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;&lt;span class="nv"&gt;BUN_INSTALL&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="s2"&gt;"/home/{USERNAME}/.bun"&lt;/span&gt;
&lt;span class="nv"&gt;PATH&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="s2"&gt;"&lt;/span&gt;&lt;span class="nv"&gt;$BUN_INSTALL&lt;/span&gt;&lt;span class="s2"&gt;/bin:&lt;/span&gt;&lt;span class="nv"&gt;$PATH&lt;/span&gt;&lt;span class="s2"&gt;"&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;with &lt;code&gt;{USERNAME}&lt;/code&gt; replaced by your username.&lt;/p&gt;

&lt;h4&gt;
  
  
  3. Close your terminal and open a new shell
&lt;/h4&gt;



&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;bun &lt;span class="nt"&gt;--version&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;should now return information on the installed version of bun&lt;/p&gt;

</description>
      <category>javascript</category>
      <category>bunjs</category>
      <category>bundler</category>
    </item>
    <item>
      <title>How to prepare yourself for the Pro Scrum Master Certification (PSM 1)</title>
      <dc:creator>Brent Vanwildemeersch</dc:creator>
      <pubDate>Mon, 20 Dec 2021 14:46:00 +0000</pubDate>
      <link>https://dev.to/vanwildemeerschbrent/how-to-prepare-for-the-psm-i-certification-1loa</link>
      <guid>https://dev.to/vanwildemeerschbrent/how-to-prepare-for-the-psm-i-certification-1loa</guid>
      <description>&lt;h2&gt;
  
  
  Introduction
&lt;/h2&gt;

&lt;p&gt;&lt;a href="https://www.scrum.org/professional-scrum-master-i-certification"&gt;The PSM I certification&lt;/a&gt; is available to anyone who wishes to validate his or her depth of knowledge of the Scrum framework and its application. Those who pass the assessment will receive the industry recognized PSM I Certification to demonstrate their fundamental level of Scrum mastery.&lt;/p&gt;

&lt;p&gt;Preparation for this assessment/certification can be very easy, if you know what to focus on. &lt;br&gt;
Therefore I will try to give an overview of the resources I used during my preparation to pass the PSM I final assessment successfully&lt;/p&gt;

&lt;h3&gt;
  
  
  &lt;a href="https://scrumguides.org/index.html"&gt;Scrum Guide&lt;/a&gt;
&lt;/h3&gt;

&lt;p&gt;The first and most important step in your preparation is the Scrum Guide. &lt;br&gt;
Don't just read this document once, read it over and over again, untill you fully digested and understand the contents of the Scrum Guide. Understanding the roles and responsibilities in Scrum, the events and artifacts included and how the support empericism will be the core knowledge required for passing the assessement.&lt;/p&gt;

&lt;h3&gt;
  
  
  &lt;a href="https://scrumorg-website-prod.s3.amazonaws.com/drupal/2021-01/NexusGuide%202021_0.pdf?nexus-file=https%3A%2F%2Fscrumorg-website-prod.s3.amazonaws.com%2Fdrupal%2F2021-01%2FNexusGuide%25202021_0.pdf"&gt;Nexus Guide&lt;/a&gt;
&lt;/h3&gt;

&lt;p&gt;The next step in your preparation can be reading and understanding The Nexus Guide. The Nexus Guide is focused on the implementation of Scaled Scrum (multiple Scrum Teams working on the same product) and how to adapt/extend the Scrum framework to scale efficiently. Although the information on Scrum.org doesn't mention The Nexus Guide as a requirement for the PSM I assessement, there can be questions in the final assessement related to Scaled Scrum implementation.&lt;/p&gt;

&lt;h3&gt;
  
  
  &lt;a href="https://www.scrum.org/resources/scrum-glossary"&gt;Scrum Glossary&lt;/a&gt;
&lt;/h3&gt;

&lt;p&gt;The Scrum Glossary will provide you with an overview of all Scrum-related terms. Some of them you will know, some of them can be new. Reading and understanding the glossary list is not required, but can be very useful in understanding the questions that will be asked during the final assessement.&lt;/p&gt;

&lt;h3&gt;
  
  
  &lt;a href="https://www.scrum.org/open-assessments"&gt;Scrum open assessments&lt;/a&gt;
&lt;/h3&gt;

&lt;p&gt;On Scrum.org, there are several open assesments available where you can test your knowledge and evaluate your current progress towards the final assessement. For the &lt;code&gt;Scrum Open&lt;/code&gt; assessment you will get 30 questions that are relatively similar to some of the questions you can get in the final assessement.&lt;br&gt;
I would advise to reach 100% on the &lt;code&gt;Scrum Open&lt;/code&gt; assessement a few times, before giving mock assessements or the final assessment a try.&lt;br&gt;
Also, don't hesitate the try the other open assessements provided like the Nexus Open, Product Owner Open or the Developer Open assessment. Some of the questions you will get will be irrelevant, others can return in the PSM I final assessement.&lt;/p&gt;

&lt;h3&gt;
  
  
  Mock Assessments
&lt;/h3&gt;

&lt;p&gt;Similar to the open assessements on Scrum.org, there are some really good (free) mock assessements available &lt;/p&gt;

&lt;p&gt;The most useful mock assessements to me were: &lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;&lt;a href="https://mlapshin.com/index.php/scrum-quizzes/sm-real-mode/"&gt;PSM Preparation Quiz&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://mplaza.training/exam-simulators/psm/"&gt;Mplaza&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;I retried these mock assessements multiple times till I could achieve 100%. &lt;br&gt;
Try not to focus on how much questions you answered wrong, but why did you get them wrong. Try to find out which part of the Scrum Guide the question relates to, and try to understand why the answer you provided is not correct, or why other answers fit better according to the Scrum Guide&lt;br&gt;
This way you will get a better and deeper understanding of the Scrum framework &lt;/p&gt;

&lt;h2&gt;
  
  
  The final assessement
&lt;/h2&gt;

&lt;p&gt;Once you are ready to take the final assessement, here are some tips that can make a difference during the exam&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Keep your eye on the clock, don't waste time&lt;/li&gt;
&lt;li&gt;Rely on your knowledge, there is not a lot of time to go looking for answers on the internet&lt;/li&gt;
&lt;li&gt;Read the questions thoroughly, there can be trick questions where one word in the question can make the difference&lt;/li&gt;
&lt;li&gt;Read all the answers before picking the one you think is right. If you are unsure about the answer, try to eliminate the ones you know are certainly wrong&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  Summary
&lt;/h2&gt;

&lt;p&gt;I hope this gives a clear summary on the available resources to prepare for the PSM I assessment/certification, or at least give you some direction/helps to focus on what to study.&lt;br&gt;
This is (of course) only a small grasp of the available resources related to the PSM I assessment, but they are the ones I felt were the most useful to me, and which I used the most to achieve the PSM I certification&lt;/p&gt;

&lt;p&gt;&lt;em&gt;(Reading, understanding and passing all the open and mock assessments is also no guarantee that you will pass the final assessment)&lt;/em&gt;&lt;/p&gt;

</description>
      <category>scrum</category>
      <category>psm1</category>
      <category>agile</category>
      <category>career</category>
    </item>
    <item>
      <title>5 useful Git-commands</title>
      <dc:creator>Brent Vanwildemeersch</dc:creator>
      <pubDate>Mon, 20 Dec 2021 12:39:31 +0000</pubDate>
      <link>https://dev.to/vanwildemeerschbrent/5-useful-git-commands-4npd</link>
      <guid>https://dev.to/vanwildemeerschbrent/5-useful-git-commands-4npd</guid>
      <description>&lt;h3&gt;
  
  
  Create a new branch
&lt;/h3&gt;

&lt;p&gt;Using the git terminal may still be the fastest way of creating a new branch, even with Git integration tools in code editors as VS Code.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight powershell"&gt;&lt;code&gt;&lt;span class="n"&gt;git&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nx"&gt;checkout&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nt"&gt;-b&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="err"&gt;&amp;lt;&lt;/span&gt;&lt;span class="nx"&gt;new-branch-name&lt;/span&gt;&lt;span class="err"&gt;&amp;gt;&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nx"&gt;master&lt;/span&gt;&lt;span class="w"&gt;
&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;




&lt;h3&gt;
  
  
  Rename your Git-branch (local and remote)
&lt;/h3&gt;

&lt;p&gt;Having a branch naming convention is a good practice and will particularly be usefull in support of git automation workflows.&lt;br&gt;
But sometimes you will find your branch not aligned with the set naming convention, and you already pushed code to the remote branch.&lt;br&gt;
With the following commands you can adjust your local and remote branch name&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight powershell"&gt;&lt;code&gt;&lt;span class="c"&gt;#Checkout the branch you want to rename&lt;/span&gt;&lt;span class="w"&gt;
&lt;/span&gt;&lt;span class="n"&gt;git&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nx"&gt;checkout&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="err"&gt;&amp;lt;&lt;/span&gt;&lt;span class="nx"&gt;old-branch-name&lt;/span&gt;&lt;span class="err"&gt;&amp;gt;&lt;/span&gt;&lt;span class="w"&gt;

&lt;/span&gt;&lt;span class="c"&gt;#Rename the branch locally&lt;/span&gt;&lt;span class="w"&gt;
&lt;/span&gt;&lt;span class="n"&gt;git&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nx"&gt;branch&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nt"&gt;-m&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="err"&gt;&amp;lt;&lt;/span&gt;&lt;span class="nx"&gt;new-branch-name&lt;/span&gt;&lt;span class="err"&gt;&amp;gt;&lt;/span&gt;&lt;span class="w"&gt;

&lt;/span&gt;&lt;span class="c"&gt;#Delete the old branch from remote &lt;/span&gt;&lt;span class="w"&gt;
&lt;/span&gt;&lt;span class="n"&gt;git&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nx"&gt;push&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nx"&gt;origin&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="err"&gt;&amp;lt;&lt;/span&gt;&lt;span class="nx"&gt;old-branch-name&lt;/span&gt;&lt;span class="err"&gt;&amp;gt;&amp;lt;&lt;/span&gt;&lt;span class="nx"&gt;new-branch-name&lt;/span&gt;&lt;span class="err"&gt;&amp;gt;&lt;/span&gt;&lt;span class="w"&gt;

&lt;/span&gt;&lt;span class="c"&gt;#Reset upstream branch for the new branch name&lt;/span&gt;&lt;span class="w"&gt;
&lt;/span&gt;&lt;span class="n"&gt;git&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nx"&gt;push&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nx"&gt;origin&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nt"&gt;-u&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="err"&gt;&amp;lt;&lt;/span&gt;&lt;span class="nx"&gt;new-branch-name&lt;/span&gt;&lt;span class="err"&gt;&amp;gt;&lt;/span&gt;&lt;span class="w"&gt;
&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h3&gt;
  
  
  Uncommit local commits
&lt;/h3&gt;

&lt;p&gt;Sometimes you can have made a commit, which you now regret and you want to remove. There are several ways to remove/undo these commits&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight powershell"&gt;&lt;code&gt;&lt;span class="c"&gt;#Keep the changes you made, but undo the commit&lt;/span&gt;&lt;span class="w"&gt;
&lt;/span&gt;&lt;span class="n"&gt;git&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nx"&gt;reset&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nt"&gt;--soft&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nx"&gt;HEAD&lt;/span&gt;&lt;span class="err"&gt;^&lt;/span&gt;&lt;span class="w"&gt;

&lt;/span&gt;&lt;span class="c"&gt;#Undo the commit and destroy all made changes&lt;/span&gt;&lt;span class="w"&gt;
&lt;/span&gt;&lt;span class="n"&gt;git&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nx"&gt;reset&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nt"&gt;--hard&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nx"&gt;HEAD&lt;/span&gt;&lt;span class="err"&gt;^&lt;/span&gt;&lt;span class="w"&gt;

&lt;/span&gt;&lt;span class="c"&gt;#Destroy/Undo more than 1 commit (2 commits in example) &lt;/span&gt;&lt;span class="w"&gt;
&lt;/span&gt;&lt;span class="n"&gt;git&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nx"&gt;reset&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nt"&gt;--hard&lt;/span&gt;&lt;span class="o"&gt;||&lt;/span&gt;&lt;span class="nt"&gt;--soft&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="n"&gt;HEAD~2&lt;/span&gt;&lt;span class="w"&gt;


&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;




&lt;h3&gt;
  
  
  Delete a file/multiple files from Git-branch (local and remote)
&lt;/h3&gt;

&lt;p&gt;Deleting a file(s) from remote could be useful if the file is deprecated or isn't supposed to be in the git repository in the first place.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight powershell"&gt;&lt;code&gt;&lt;span class="c"&gt;#Remove your file(s) locally &lt;/span&gt;&lt;span class="w"&gt;
&lt;/span&gt;&lt;span class="n"&gt;git&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nx"&gt;rm&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="err"&gt;&amp;lt;&lt;/span&gt;&lt;span class="nx"&gt;file-a&lt;/span&gt;&lt;span class="err"&gt;&amp;gt;&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="err"&gt;&amp;lt;&lt;/span&gt;&lt;span class="nx"&gt;file-b&lt;/span&gt;&lt;span class="err"&gt;&amp;gt;&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="o"&gt;...&lt;/span&gt;&lt;span class="w"&gt;

&lt;/span&gt;&lt;span class="c"&gt;#Commit your changes &lt;/span&gt;&lt;span class="w"&gt;
&lt;/span&gt;&lt;span class="n"&gt;git&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nx"&gt;commit&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nt"&gt;-m&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s2"&gt;"Commit message"&lt;/span&gt;&lt;span class="w"&gt;

&lt;/span&gt;&lt;span class="c"&gt;#Push changes to git&lt;/span&gt;&lt;span class="w"&gt;
&lt;/span&gt;&lt;span class="n"&gt;git&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nx"&gt;push&lt;/span&gt;&lt;span class="w"&gt;
&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;





&lt;h3&gt;
  
  
  Remove dead branches
&lt;/h3&gt;

&lt;p&gt;When you work on decent sized projects, it can occur that the git-repository has tens or hundreds of branches from previous pull requests. &lt;br&gt;
Most of these branches are probably already merged and deleted on the remote repository, but they still are listed on your local machine.&lt;br&gt;
To delete these dead branches, use the following command&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight powershell"&gt;&lt;code&gt;&lt;span class="n"&gt;git&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nx"&gt;remote&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nx"&gt;update&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nt"&gt;--prune&lt;/span&gt;&lt;span class="w"&gt;
&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



</description>
      <category>git</category>
      <category>commands</category>
      <category>beginners</category>
    </item>
    <item>
      <title>Use Powershell within Hyper Terminal (Windows)</title>
      <dc:creator>Brent Vanwildemeersch</dc:creator>
      <pubDate>Tue, 17 Nov 2020 09:14:21 +0000</pubDate>
      <link>https://dev.to/vanwildemeerschbrent/use-powershell-within-hyper-terminal-windows-51k3</link>
      <guid>https://dev.to/vanwildemeerschbrent/use-powershell-within-hyper-terminal-windows-51k3</guid>
      <description>&lt;p&gt;How to set up your &lt;a href="https://hyper.is/"&gt;Hyper&lt;/a&gt;-terminal environment to use Powershell as default. Only for windows&lt;/p&gt;

&lt;h4&gt;
  
  
  Open &lt;code&gt;.hyper&lt;/code&gt; config file from Hyper terminal
&lt;/h4&gt;

&lt;ul&gt;
&lt;li&gt;Go to the menu&lt;/li&gt;
&lt;li&gt;Click edit&lt;/li&gt;
&lt;li&gt;Click Preferences&lt;/li&gt;
&lt;/ul&gt;

&lt;h4&gt;
  
  
  Open &lt;code&gt;.hyper&lt;/code&gt; config file from File Explorer
&lt;/h4&gt;

&lt;ul&gt;
&lt;li&gt;Go to &lt;code&gt;C:\Users\{user}\AppData\Roaming\Hyper&lt;/code&gt;
&lt;/li&gt;
&lt;li&gt;Open &lt;code&gt;.hyper&lt;/code&gt; config in editor &lt;/li&gt;
&lt;/ul&gt;

&lt;h4&gt;
  
  
  Add Powershell.exe location
&lt;/h4&gt;

&lt;ul&gt;
&lt;li&gt;Scroll down to the &lt;code&gt;shell&lt;/code&gt; argument in the &lt;code&gt;.hyper&lt;/code&gt; config.&lt;/li&gt;
&lt;li&gt;Replace the value after &lt;code&gt;shell:&lt;/code&gt; with &lt;code&gt;"C:\\Windows\\System32\\WindowsPowerShell\\v1.0\\powershell.exe"&lt;/code&gt;
&lt;/li&gt;
&lt;li&gt;Remove &lt;code&gt;--login&lt;/code&gt; from &lt;code&gt;shellArgs:[]&lt;/code&gt;. &lt;code&gt;--login&lt;/code&gt; argument will prevent Powershell from opening.&lt;/li&gt;
&lt;/ul&gt;

&lt;h4&gt;
  
  
  Reload Hyper Terminal
&lt;/h4&gt;

&lt;ul&gt;
&lt;li&gt;Close Hyper terminal and restart Hyper&lt;/li&gt;
&lt;li&gt;Or click View&amp;lt;/&amp;gt; and click Reload or Full Reload&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Powershell should now be running as default in your Hyper terminal&lt;/p&gt;

</description>
      <category>todayilearned</category>
      <category>powershell</category>
      <category>hyper</category>
    </item>
    <item>
      <title>How to deploy your Node App/API on Heroku</title>
      <dc:creator>Brent Vanwildemeersch</dc:creator>
      <pubDate>Mon, 16 Nov 2020 19:25:30 +0000</pubDate>
      <link>https://dev.to/vanwildemeerschbrent/how-to-deploy-your-node-app-api-on-heroku-44n6</link>
      <guid>https://dev.to/vanwildemeerschbrent/how-to-deploy-your-node-app-api-on-heroku-44n6</guid>
      <description>&lt;p&gt;Deploying a website/web app is easy in these modern times with deploying services such as Firebase, Netlify,...&lt;br&gt;
But to deploy Node apps or apps that have some sort of communication with backend-services or database, we have to look further than one of the static deployment services.&lt;br&gt;
To deploy an app like this, we need to look at services like Heroku, Back4App, or Google App Engine. &lt;br&gt;
In this example, Heroku will be used for deployment.&lt;/p&gt;

&lt;p&gt;This guide can be used for Node.js web apps, but also for Node API's using &lt;code&gt;.env&lt;/code&gt; variables. This API is built with &lt;a href="https://expressjs.com/"&gt;Express&lt;/a&gt;. &lt;/p&gt;
&lt;h3&gt;
  
  
  1. Make your API production-ready
&lt;/h3&gt;
&lt;h4&gt;
  
  
  Port listeners
&lt;/h4&gt;

&lt;p&gt;When building your app, a port was set to where the app should listen too. (Mostly in the root file like index.js/app.js)&lt;br&gt;
For example:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight javascript"&gt;&lt;code&gt;&lt;span class="nx"&gt;app&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;listen&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="mi"&gt;3000&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="p"&gt;()&lt;/span&gt; &lt;span class="o"&gt;=&amp;gt;&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
  &lt;span class="nx"&gt;console&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;log&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="s2"&gt;`App listening on http://localhost:3000`&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;
&lt;span class="p"&gt;});&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;If there is still a hardcoded port number in use as a listener for the app, this needs to be changed.&lt;br&gt;
To be able to run the app on the Heroku servers, the port needs to change to an environment variable but can be used in combination with the hardcoded value.&lt;br&gt;
For example:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight javascript"&gt;&lt;code&gt;&lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="nx"&gt;PORT&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="nx"&gt;process&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;env&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;PORT&lt;/span&gt; &lt;span class="o"&gt;||&lt;/span&gt; &lt;span class="mi"&gt;3000&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
&lt;span class="nx"&gt;app&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;listen&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;PORT&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="p"&gt;()&lt;/span&gt; &lt;span class="o"&gt;=&amp;gt;&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
  &lt;span class="nx"&gt;console&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;warn&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="s2"&gt;`App listening on http://localhost:&lt;/span&gt;&lt;span class="p"&gt;${&lt;/span&gt;&lt;span class="nx"&gt;PORT&lt;/span&gt;&lt;span class="p"&gt;}&lt;/span&gt;&lt;span class="s2"&gt;`&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;
&lt;span class="p"&gt;});&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;After adjusting your code, the application will run locally on port 3000 but will use the environment variable on the Heroku servers.&lt;/p&gt;

&lt;h4&gt;
  
  
  Package.json
&lt;/h4&gt;

&lt;p&gt;In the package.json, create a command that will start your app on the Heroku server&lt;br&gt;
For example &lt;code&gt;npm start&lt;/code&gt;&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight json"&gt;&lt;code&gt;&lt;span class="nl"&gt;"scripts"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="p"&gt;{&lt;/span&gt;&lt;span class="w"&gt;
    &lt;/span&gt;&lt;span class="nl"&gt;"test"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s2"&gt;"echo &lt;/span&gt;&lt;span class="se"&gt;\"&lt;/span&gt;&lt;span class="s2"&gt;Error: no test specified&lt;/span&gt;&lt;span class="se"&gt;\"&lt;/span&gt;&lt;span class="s2"&gt; &amp;amp;&amp;amp; exit 1"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="w"&gt;
    &lt;/span&gt;&lt;span class="nl"&gt;"dev"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s2"&gt;"nodemon ./index.js"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="w"&gt;
    &lt;/span&gt;&lt;span class="nl"&gt;"start"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s2"&gt;"node index.js"&lt;/span&gt;&lt;span class="w"&gt;
  &lt;/span&gt;&lt;span class="p"&gt;}&lt;/span&gt;&lt;span class="err"&gt;,&lt;/span&gt;&lt;span class="w"&gt;
&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;In this example, &lt;code&gt;npm start&lt;/code&gt; can be used to run the app on the Heroku server, or locally in production mode, and the &lt;code&gt;dev&lt;/code&gt; can be used to run the app in development using nodemon.&lt;br&gt;
We will use the command to start the app in production in the &lt;code&gt;Procfile&lt;/code&gt;&lt;/p&gt;

&lt;h4&gt;
  
  
  Procfile
&lt;/h4&gt;

&lt;p&gt;A &lt;code&gt;Procfile&lt;/code&gt; is a Heroku file that defines the dynos settings for your project. The content of your Procfile will define how Heroku will start your Node app. &lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;Create a &lt;code&gt;Procfile&lt;/code&gt; in the root of your project&lt;/li&gt;
&lt;li&gt;Add the content &lt;code&gt;web:&lt;/code&gt; to the newly created Procfile let it be followed by your command to run the node app in production. In this case, the Procfile will look as following
&lt;/li&gt;
&lt;/ol&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;web:npm start
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;You can also call &lt;code&gt;node index.js&lt;/code&gt; directly if you want.&lt;/p&gt;

&lt;h3&gt;
  
  
  2. Create a new project on Heroku
&lt;/h3&gt;

&lt;p&gt;When logged in to the Heroku platform, you can create a new Heroku-app in the dashboard by clicking the New button.&lt;br&gt;
After giving it a name and choosing a region, we can now link our codebase to our Heroku app.&lt;/p&gt;

&lt;h3&gt;
  
  
  3. Link your repository to Heroku
&lt;/h3&gt;

&lt;p&gt;You can link your codebase in several ways to your Heroku app: &lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Using the Heroku CLI in combination with Git&lt;/li&gt;
&lt;li&gt;Using the Heroku CLI in combination with Docker &lt;/li&gt;
&lt;li&gt;Using Github to connect your repository directly to the app&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Since the API codebase in this example was hosted on Github, we opt to connect the repository directly to the app.&lt;br&gt;
This means every time a commit is done to the &lt;code&gt;master/main&lt;/code&gt; branch of the repository, the Heroku app will rebuild and re-deploy.&lt;/p&gt;

&lt;h3&gt;
  
  
  4. Add environment variables to Heroku
&lt;/h3&gt;

&lt;p&gt;If you are using a &lt;code&gt;.env&lt;/code&gt; file in your Node App or API to store environment variables or to keep credentials to API's or others hidden, you will have to add the env variables stored in your &lt;code&gt;.env&lt;/code&gt; file manually to the Heroku app.&lt;br&gt;
These can be done with Heroku CLI, or within the GUI of your Heroku app&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;Go to the settings tab of your Heroku app&lt;/li&gt;
&lt;li&gt;Go to Config Vars and click Reveal Config Vars&lt;/li&gt;
&lt;li&gt;Add the variables from the &lt;code&gt;.env&lt;/code&gt; file as key-value pairs to the Config Vars of your app
&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;Heroku cannot read nor process &lt;code&gt;.env&lt;/code&gt; files, so it will not be able to access your environment variables necessary for the deploying app.&lt;br&gt;
If you are using an &lt;code&gt;.env&lt;/code&gt; file and you are not adding the Config Vars to your app, your app will not work.&lt;/p&gt;

&lt;h3&gt;
  
  
  5. All set, API should be up and running
&lt;/h3&gt;

&lt;p&gt;After following every step in this guide, the API should now be up and running on the Heroku servers.&lt;br&gt; In the case of an API, it can be useful to add some documentation or a landing page when a simple GET request is done to the root URL. This will give visual confirmation the API is up.&lt;/p&gt;

&lt;h3&gt;
  
  
  6. Deployment success, the app is not working
&lt;/h3&gt;

&lt;p&gt;If the deployment of your app was successful, but your app is not working correctly, you can see the logs of the deployed app making use of the Heroku CLI or the GUI of your app.&lt;br&gt;
&lt;a href="https://devcenter.heroku.com/articles/logging"&gt;Heroku Logging Docs&lt;/a&gt;&lt;/p&gt;

</description>
      <category>node</category>
      <category>heroku</category>
      <category>webdev</category>
    </item>
    <item>
      <title>5 useful browser extensions for front-end developers</title>
      <dc:creator>Brent Vanwildemeersch</dc:creator>
      <pubDate>Sat, 14 Nov 2020 06:38:36 +0000</pubDate>
      <link>https://dev.to/vanwildemeerschbrent/5-useful-browser-extensions-for-front-end-devs-5c0d</link>
      <guid>https://dev.to/vanwildemeerschbrent/5-useful-browser-extensions-for-front-end-devs-5c0d</guid>
      <description>&lt;h3&gt;
  
  
  1. Site Palette
&lt;/h3&gt;

&lt;p&gt;A browser extension to create comprehensive color palettes. A must-have tool for designers and front-end developers.&lt;br&gt;
Site Palette will extract all the colors used on a website and create a color palette. You can share and export your palettes to Sketch, Adobe Swatch, and more.&lt;br&gt;
&lt;a href="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fpalette.site%2Fassets%2Fsection-overview-f9d0f2db5ee1916b7432c5421f583ff2963ac9b4f2e08dfe04b326ca31c17a0c.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fpalette.site%2Fassets%2Fsection-overview-f9d0f2db5ee1916b7432c5421f583ff2963ac9b4f2e08dfe04b326ca31c17a0c.png" alt="Site palette example"&gt;&lt;/a&gt;&lt;br&gt;
&lt;a href="https://chrome.google.com/webstore/detail/site-palette/pekhihjiehdafocefoimckjpbkegknoh?ref=designrevision.com" rel="noopener noreferrer"&gt;Link to extension&lt;/a&gt;&lt;/p&gt;

&lt;h3&gt;
  
  
  2. Fonts Ninja
&lt;/h3&gt;

&lt;p&gt;Identify fonts used on any website, bookmark them, try them out, and buy them.&lt;br&gt;
This is a great tool to detect on a webpage which fonts are used, and use them in your own code (if free and available of course)&lt;br&gt;&lt;br&gt;
&lt;a href="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Flh3.googleusercontent.com%2FOgfkIhQhHqC-6Jt0oB9i3vUK6dEmKaR8vAfL6de1fvaRDuAl9YspXPFU8fjPBOndEUruRamJcug%3Dw640-h400-e365-rj-sc0x00ffffff" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Flh3.googleusercontent.com%2FOgfkIhQhHqC-6Jt0oB9i3vUK6dEmKaR8vAfL6de1fvaRDuAl9YspXPFU8fjPBOndEUruRamJcug%3Dw640-h400-e365-rj-sc0x00ffffff" alt="Font Face Ninja example"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;a href="https://chrome.google.com/webstore/detail/fonts-ninja/eljapbgkmlngdpckoiiibecpemleclhh" rel="noopener noreferrer"&gt;Link to extension&lt;/a&gt;&lt;/p&gt;

&lt;h3&gt;
  
  
  3. ColorZilla
&lt;/h3&gt;

&lt;p&gt;ColorZilla is an advanced Eyedropping tool, Color Picker, Gradient Generator, and much more. Using ColorZilla you can easily extract color from any point in the browser, and copy the color straight to your code editor, Photoshop file, ... &lt;br&gt;&lt;/p&gt;

&lt;p&gt;Useful features of ColorZilla&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Eyedropper - Get the color of every pixel on the page&lt;/li&gt;
&lt;li&gt;Advanced Color Picker&lt;/li&gt;
&lt;li&gt;CSS Gradient Generator&lt;/li&gt;
&lt;li&gt;Webpage Color Analyzer - Create color palette for webpage&lt;/li&gt;
&lt;li&gt;Color History - review recently picked colors&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;a href="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Flh3.googleusercontent.com%2FP77_Pe5xvds-T4r2LJZhj2nIZ7JS7n58mOI9AhpwvTquBlvy0DvZ3YSADGIjsAaLjDbvrit_Rg%3Dw640-h400-e365-rj-sc0x00ffffff" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Flh3.googleusercontent.com%2FP77_Pe5xvds-T4r2LJZhj2nIZ7JS7n58mOI9AhpwvTquBlvy0DvZ3YSADGIjsAaLjDbvrit_Rg%3Dw640-h400-e365-rj-sc0x00ffffff" alt="ColorZilla example"&gt;&lt;/a&gt;&lt;br&gt;
&lt;a href="https://chrome.google.com/webstore/detail/colorzilla/bhlhnicpbhignbdhedgjhgdocnmhomnp" rel="noopener noreferrer"&gt;Link to extension&lt;/a&gt;&lt;/p&gt;

&lt;h3&gt;
  
  
  4. Page Ruler
&lt;/h3&gt;

&lt;p&gt;A great tool to measure objects on a webpage. Measures width and height in pixels.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Flh3.googleusercontent.com%2F78WNH7CwMwmdMO5sSlCehZSwX-qdH5SYRQ5h8KdkgkdFydVYajWpIC5ML2GL-1XVSrmSkY6g%3Dw640-h400-e365-rj-sc0x00ffffff" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Flh3.googleusercontent.com%2F78WNH7CwMwmdMO5sSlCehZSwX-qdH5SYRQ5h8KdkgkdFydVYajWpIC5ML2GL-1XVSrmSkY6g%3Dw640-h400-e365-rj-sc0x00ffffff" alt="Page ruler example"&gt;&lt;/a&gt;&lt;br&gt;
&lt;a href="https://chrome.google.com/webstore/detail/page-ruler/idhjfgkakeliobkfbijghiaklmiaheag?hl=en" rel="noopener noreferrer"&gt;Link to extension&lt;/a&gt;&lt;/p&gt;

&lt;h3&gt;
  
  
  5. JSON Formatter
&lt;/h3&gt;

&lt;p&gt;Extension to show JSON content in the browser in a clear and readable way. &lt;br&gt;
Useful features : &lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;JSON &amp;amp; JSONP support&lt;/li&gt;
&lt;li&gt;Syntax highlighting&lt;/li&gt;
&lt;li&gt;Collapsable trees, with indent guides&lt;/li&gt;
&lt;li&gt;Clickable URLs&lt;/li&gt;
&lt;li&gt;Toggle between raw and parsed JSON content&lt;/li&gt;
&lt;li&gt;For URLs or local files&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;a href="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Flh3.googleusercontent.com%2F68vofGty-EmFi1WHH-y0IbwRXeJpKTg3eTZOjZQoZAhJ6vuY7cL0G6yJ0CsE5sooUtJkSbqwUbI%3Dw640-h400-e365-rj-sc0x00ffffff" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Flh3.googleusercontent.com%2F68vofGty-EmFi1WHH-y0IbwRXeJpKTg3eTZOjZQoZAhJ6vuY7cL0G6yJ0CsE5sooUtJkSbqwUbI%3Dw640-h400-e365-rj-sc0x00ffffff"&gt;&lt;/a&gt;&lt;br&gt;
&lt;a href="https://chrome.google.com/webstore/detail/json-formatter/bcjindcccaagfpapjjmafapmmgkkhgoa?hl=en" rel="noopener noreferrer"&gt;Link to extension&lt;/a&gt;&lt;/p&gt;

</description>
      <category>webdev</category>
      <category>beginners</category>
    </item>
    <item>
      <title>Deploy to Github Pages using Github Actions</title>
      <dc:creator>Brent Vanwildemeersch</dc:creator>
      <pubDate>Fri, 13 Nov 2020 21:28:35 +0000</pubDate>
      <link>https://dev.to/vanwildemeerschbrent/how-to-deploy-to-github-pages-using-github-actions-57k8</link>
      <guid>https://dev.to/vanwildemeerschbrent/how-to-deploy-to-github-pages-using-github-actions-57k8</guid>
      <description>&lt;p&gt;My personal site/portfolio has always been hosted on &lt;a href="https://pages.github.com/"&gt;Github Pages&lt;/a&gt;, but recently I decided to automate my workflow for my site. I opted to give &lt;a href="https://github.com/features/actions"&gt;Github Actions&lt;/a&gt; a try to implement a CI/CD process, and build and deploy the codebase to the already existing Github Pages Repository (see GH Pages documentation).&lt;/p&gt;

&lt;p&gt;The codebase I used for building and deploying with GH Actions is a VueJS app, but you can adjust the workflow to fit your needs or programming language.&lt;/p&gt;

&lt;p&gt;The workflow I used is to deploy built code into the root directory of your GH Pages, not in a subdirectory (Application that will be shown on &lt;code&gt;{{Github_username}}.github.io&lt;/code&gt; and not on &lt;code&gt;{{Github_username}}.github.io/myNewApplication&lt;/code&gt;&lt;/p&gt;

&lt;h4&gt;
  
  
  1. Enable Github Actions &amp;amp; init Github workflow
&lt;/h4&gt;

&lt;ul&gt;
&lt;li&gt;In the GH repository of the codebase, click on the Actions tab.&lt;/li&gt;
&lt;li&gt;If not enabled yet, in the Github Actions  overview, you can opt to use an already existing workflow, or skip and set up a workflow yourself.(I chose to create my own workflow, but this is a preference)&lt;/li&gt;
&lt;li&gt; When selecting a pre-configured workflow, a YAML editor will open with the selected workflow configuration, when opting to create your own, Github will configure a workflow file based on the type of codebase and show you in the YAML editor&lt;/li&gt;
&lt;li&gt;You can give the workflow file a different name based on the process/action you want to run in the action(build, deploy, test,...), change the name to branch-specific information (dev, stage, production), or give it a name of choice &lt;/li&gt;
&lt;li&gt;(I always initialize and commit the workflow file first, before making any changes, added to the repository, by clicking Start Commit and confirming. Again, this is a preference)&lt;/li&gt;
&lt;li&gt;(If not committed yet, you can continue with the next step.
If committed first, you will be returned back to the location of where the &lt;code&gt;workflow.yml&lt;/code&gt; was added in your repo. To return back to editing the workflow, click Actions, select the latest workflow commit, and click on Workflow file. In this detailed overview, you will be able to change the &lt;code&gt;.yaml&lt;/code&gt; file using the edit button.)&lt;/li&gt;
&lt;/ul&gt;

&lt;h4&gt;
  
  
  2. Adjust the workflow to fit your needs
&lt;/h4&gt;

&lt;p&gt;To be able to build my Vue codebase and deploy my built code, I used the following &lt;code&gt;workflow.yml&lt;/code&gt;. I added comments to the file to explain all parts of the workflow.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight yaml"&gt;&lt;code&gt;&lt;span class="c1"&gt;# Name that will define how it shows up in &lt;/span&gt;
&lt;span class="c1"&gt;# your Github Action overview for this repository&lt;/span&gt;
&lt;span class="na"&gt;name&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt; &lt;span class="s"&gt;Build and Deploy&lt;/span&gt;


&lt;span class="c1"&gt;# Defines what events the workflow will listen to in repository&lt;/span&gt;
&lt;span class="c1"&gt;# In this case commits and pull-requests on master-branch&lt;/span&gt;
&lt;span class="na"&gt;on&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt;
  &lt;span class="na"&gt;push&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt;
    &lt;span class="na"&gt;branches&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt; &lt;span class="pi"&gt;[&lt;/span&gt;&lt;span class="nv"&gt;master&lt;/span&gt;&lt;span class="pi"&gt;]&lt;/span&gt;
  &lt;span class="na"&gt;pull_request&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt;
    &lt;span class="na"&gt;branches&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt; &lt;span class="pi"&gt;[&lt;/span&gt;&lt;span class="nv"&gt;master&lt;/span&gt;&lt;span class="pi"&gt;]&lt;/span&gt;

&lt;span class="c1"&gt;# What jobs will run in your workflow -&amp;gt; build_and_deploy&lt;/span&gt;
&lt;span class="c1"&gt;# Jobs can run in parallel or sequentially&lt;/span&gt;
&lt;span class="na"&gt;jobs&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt;
  &lt;span class="na"&gt;build_and_deploy&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt;
    &lt;span class="c1"&gt;# Type of runner that this job wil run on -&amp;gt; Linux Ubuntu&lt;/span&gt;
    &lt;span class="na"&gt;runs-on&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt; &lt;span class="s"&gt;ubuntu-latest&lt;/span&gt;

    &lt;span class="c1"&gt;# Define which node version to use in the runner.&lt;/span&gt;
    &lt;span class="c1"&gt;# Use node version 14.15.0, latest Node LTS version &lt;/span&gt;
    &lt;span class="na"&gt;strategy&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt;
      &lt;span class="na"&gt;matrix&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt;
        &lt;span class="na"&gt;node-version&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt; &lt;span class="pi"&gt;[&lt;/span&gt;&lt;span class="nv"&gt;14.15.0&lt;/span&gt;&lt;span class="pi"&gt;]&lt;/span&gt;

    &lt;span class="c1"&gt;# Steps that are part of the build_and_deploy job&lt;/span&gt;
    &lt;span class="c1"&gt;# Steps represent a sequence of tasks that will be executed&lt;/span&gt;
    &lt;span class="na"&gt;steps&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt;
        &lt;span class="c1"&gt;# Action that will checkout repository so the workflow can &lt;/span&gt;
        &lt;span class="c1"&gt;# access the codebase&lt;/span&gt;
      &lt;span class="pi"&gt;-&lt;/span&gt; &lt;span class="na"&gt;uses&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt; &lt;span class="s"&gt;actions/checkout@v2&lt;/span&gt;

        &lt;span class="c1"&gt;# Action allowing caching of node_modules to improve &lt;/span&gt;
        &lt;span class="c1"&gt;# workflow execution time&lt;/span&gt;
        &lt;span class="c1"&gt;# {{runner.os}} will use defined runner 'ubuntu-latest'&lt;/span&gt;
      &lt;span class="pi"&gt;-&lt;/span&gt; &lt;span class="na"&gt;name&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt; &lt;span class="s"&gt;Cache node_modules&lt;/span&gt;
        &lt;span class="na"&gt;uses&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt; &lt;span class="s"&gt;actions/cache@v2&lt;/span&gt;
        &lt;span class="na"&gt;env&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt;
          &lt;span class="na"&gt;cache-name&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt; &lt;span class="s"&gt;cache-node-modules&lt;/span&gt;
        &lt;span class="na"&gt;with&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt;
          &lt;span class="na"&gt;path&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt; &lt;span class="s"&gt;~/.npm&lt;/span&gt;
          &lt;span class="na"&gt;key&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt; &lt;span class="s"&gt;${{ runner.os }}-build-${{ env.cache-name}}-${{hashFiles('**/package-lock.json') }}&lt;/span&gt;
          &lt;span class="na"&gt;restore-keys&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt; &lt;span class="pi"&gt;|&lt;/span&gt;
            &lt;span class="s"&gt;${{ runner.os }}-build-${{ env.cache-name }}-&lt;/span&gt;
            &lt;span class="s"&gt;${{ runner.os }}-build-&lt;/span&gt;
            &lt;span class="s"&gt;${{ runner.os }}-&lt;/span&gt;

        &lt;span class="c1"&gt;# Sets node environment for use in action&lt;/span&gt;
        &lt;span class="c1"&gt;# {{matrix.node-version}} will use Github default Node.js &lt;/span&gt;
        &lt;span class="c1"&gt;# version&lt;/span&gt;
      &lt;span class="pi"&gt;-&lt;/span&gt; &lt;span class="na"&gt;name&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt; &lt;span class="s"&gt;Node ${{matrix.node-version}}&lt;/span&gt;
        &lt;span class="na"&gt;uses&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt; &lt;span class="s"&gt;actions/setup-node@v1&lt;/span&gt;
        &lt;span class="na"&gt;with&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt;
          &lt;span class="na"&gt;node-version&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt; &lt;span class="s"&gt;${{matrix.node-version}}&lt;/span&gt;

        &lt;span class="c1"&gt;# Run npm commands to install NPM packages&lt;/span&gt;
      &lt;span class="pi"&gt;-&lt;/span&gt; &lt;span class="na"&gt;name&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt; &lt;span class="s"&gt;Install dependencies&lt;/span&gt;
        &lt;span class="na"&gt;run&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt; &lt;span class="s"&gt;npm install&lt;/span&gt;

        &lt;span class="c1"&gt;# Run npm build command for Vue project&lt;/span&gt;
      &lt;span class="pi"&gt;-&lt;/span&gt; &lt;span class="na"&gt;name&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt; &lt;span class="s"&gt;Build Project&lt;/span&gt;
        &lt;span class="na"&gt;run&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt; &lt;span class="s"&gt;npm run build&lt;/span&gt;

        &lt;span class="c1"&gt;# Push built code to the upfront created GH pages repo&lt;/span&gt;
      &lt;span class="pi"&gt;-&lt;/span&gt; &lt;span class="na"&gt;name&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt; &lt;span class="s"&gt;Pushes to another repository&lt;/span&gt;
        &lt;span class="na"&gt;uses&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt; &lt;span class="s"&gt;cpina/github-action-push-to-another-repository@master&lt;/span&gt;
        &lt;span class="na"&gt;env&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt;
          &lt;span class="c1"&gt;# Create and store API_TOKEN_GITHUB in repository &lt;/span&gt;
          &lt;span class="c1"&gt;# secrets -&amp;gt; explained later in this article&lt;/span&gt;
          &lt;span class="na"&gt;API_TOKEN_GITHUB&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt; &lt;span class="s"&gt;${{ secrets.API_TOKEN_GITHUB }}&lt;/span&gt;
        &lt;span class="na"&gt;with&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt;
          &lt;span class="c1"&gt;# Define source directory to push from -&amp;gt; Vue default &lt;/span&gt;
          &lt;span class="c1"&gt;# built into /dist folder&lt;/span&gt;
          &lt;span class="na"&gt;source-directory&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt; &lt;span class="s1"&gt;'&lt;/span&gt;&lt;span class="s"&gt;dist'&lt;/span&gt;
          &lt;span class="c1"&gt;# Set user settings and repository to push to&lt;/span&gt;
          &lt;span class="na"&gt;destination-github-username&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt; &lt;span class="s1"&gt;'&lt;/span&gt;&lt;span class="s"&gt;{{Your_Username}}'&lt;/span&gt;
          &lt;span class="na"&gt;destination-repository-name&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt; &lt;span class="s1"&gt;'&lt;/span&gt;&lt;span class="s"&gt;{{GH_Pages_Repository}}'&lt;/span&gt;
          &lt;span class="na"&gt;user-email&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt; &lt;span class="pi"&gt;{{&lt;/span&gt;&lt;span class="nv"&gt;Your_email&lt;/span&gt;&lt;span class="pi"&gt;}}&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;b&gt;How to create &lt;code&gt;API_TOKEN_GITHUB&lt;/code&gt; secret&lt;/b&gt;&lt;br&gt;
Generate your personal token following the steps:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Go to the Github Settings (on the right-hand side of the profile picture)&lt;/li&gt;
&lt;li&gt;On the left-hand side pane click on "Developer Settings"&lt;/li&gt;
&lt;li&gt;Click on "Personal Access Tokens"&lt;/li&gt;
&lt;li&gt;Generate a new token, choose "Repo". Copy the token.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Then make the token available to the Github Action following the steps:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Go to the Github page for the repository that you push from, click on "Settings"&lt;/li&gt;
&lt;li&gt;On the left-hand side pane click on "Secrets"&lt;/li&gt;
&lt;li&gt;Click on "Add a new secret" and name it "API_TOKEN_GITHUB"&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Now your Github repository secret will be available as &lt;code&gt;{{ secrets.API_TOKEN_GITHUB}}&lt;/code&gt; in your workflow.&lt;br&gt;
&lt;br&gt;&lt;/p&gt;

&lt;p&gt;Docs for used actions and settings&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;&lt;a href="https://github.com/actions/checkout"&gt;actions/checkout@v2&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://github.com/actions/cache"&gt;actions/cache@v2&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://github.com/actions/setup-node"&gt;actions/setup-node@v1&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://github.com/cpina/github-action-push-to-another-repository"&gt;cpina/github-action-push-to-another-repository@master&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;
&lt;a href="https://docs.github.com/en/free-pro-team@latest/actions/reference/encrypted-secrets"&gt;Github Encrypted secrets&lt;/a&gt; &lt;/li&gt;
&lt;/ol&gt;

&lt;h4&gt;
  
  
  3. Commit to the master branch to verify it's working
&lt;/h4&gt;

&lt;p&gt;All set, after committing the updated version of the &lt;code&gt;workflow.yml&lt;/code&gt; file and creating a change on the &lt;code&gt;master&lt;/code&gt;-branch (in this case) you should see an ongoing GH Action that will build your codebase and then push it to the destination repository, your original Github Pages repository.&lt;br&gt;
You can follow your build steps in the detailed console logs when selecting your latest commit in the Actions&amp;lt;/&amp;gt; overview&lt;/p&gt;

</description>
    </item>
    <item>
      <title>Docker: Angular setup + issue exposed port not accessible</title>
      <dc:creator>Brent Vanwildemeersch</dc:creator>
      <pubDate>Fri, 06 Nov 2020 10:22:13 +0000</pubDate>
      <link>https://dev.to/vanwildemeerschbrent/docker-angular-setup-issue-exposed-port-not-accessible-98m</link>
      <guid>https://dev.to/vanwildemeerschbrent/docker-angular-setup-issue-exposed-port-not-accessible-98m</guid>
      <description>&lt;p&gt;Dockerizing an Angular application + how to solve the issue of an exposed port on the Docker container is not accessible in your browser&lt;/p&gt;

&lt;h4&gt;
  
  
  Create DockerFile
&lt;/h4&gt;

&lt;p&gt;Create a &lt;code&gt;DockerFile&lt;/code&gt; in the root folder of the project with the following content.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight docker"&gt;&lt;code&gt;&lt;span class="k"&gt;FROM&lt;/span&gt;&lt;span class="s"&gt; node:14.15.0&lt;/span&gt;

&lt;span class="k"&gt;WORKDIR&lt;/span&gt;&lt;span class="s"&gt; /app&lt;/span&gt;

&lt;span class="k"&gt;ENV&lt;/span&gt;&lt;span class="s"&gt; PATH /app/node_modules/.bin:$PATH&lt;/span&gt;

&lt;span class="k"&gt;COPY&lt;/span&gt;&lt;span class="s"&gt; package.json /app/package.json&lt;/span&gt;
&lt;span class="k"&gt;RUN &lt;/span&gt;npm &lt;span class="nb"&gt;install&lt;/span&gt;
&lt;span class="k"&gt;RUN &lt;/span&gt;npm &lt;span class="nb"&gt;install&lt;/span&gt; &lt;span class="nt"&gt;-g&lt;/span&gt; @angular/cli@10.2.0


&lt;span class="k"&gt;COPY&lt;/span&gt;&lt;span class="s"&gt; . /app&lt;/span&gt;

&lt;span class="k"&gt;CMD&lt;/span&gt;&lt;span class="s"&gt; npm start&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;ul&gt;
&lt;li&gt;Use the latest LTS version of Node.js to create the Docker container&lt;/li&gt;
&lt;li&gt;Create a working directory in the container (WORKDIR /app)&lt;/li&gt;
&lt;li&gt;Copy package.json and install all dependencies in Docker container&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Install the latest version of the &lt;a href="https://github.com/angular/angular-cli"&gt;angular-cli&lt;/a&gt; globally in the container&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Copy the current directory into the /app directory of the container&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Add the command npm start&lt;/p&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;h3&gt;
  
  
  Create Docker Image
&lt;/h3&gt;

&lt;p&gt;Create a new DockerImage with the name of your app (angularapp) and a tag of choice (dev in this case).&lt;br&gt;
Then add the current directory (.) as a second parameter to the build command&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;docker build &lt;span class="nt"&gt;-t&lt;/span&gt; angularapp:dev &lt;span class="nb"&gt;.&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h3&gt;
  
  
  Run Docker container with the created image
&lt;/h3&gt;



&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;docker run &lt;span class="nt"&gt;-v&lt;/span&gt; &lt;span class="k"&gt;${&lt;/span&gt;&lt;span class="nv"&gt;PWD&lt;/span&gt;&lt;span class="k"&gt;}&lt;/span&gt;:/app &lt;span class="nt"&gt;-v&lt;/span&gt;/app/node_modules &lt;span class="nt"&gt;-p&lt;/span&gt; 4200:4200 &lt;span class="nt"&gt;--rm&lt;/span&gt; angularapp:dev
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;

&lt;p&gt;&lt;br&gt;
bash&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;code&gt;-v ${PWD}:/app&lt;/code&gt; mounts the code in the containers /app directory&lt;/li&gt;
&lt;li&gt;
&lt;code&gt;-v/app/node_modules&lt;/code&gt; mounts the node_modules of the container to be used instead of the locally installed node_modules folder. Deleting the locally installed node modules is possible now&lt;/li&gt;
&lt;li&gt;
&lt;code&gt;-p 4200:4200&lt;/code&gt; exposes the 4200 port (ng serve uses default port 4200) of the Docker container to other docker containers, and maps it to the 4200 port of the Docker host&lt;/li&gt;
&lt;li&gt;
&lt;code&gt;--rm&lt;/code&gt; will remove all mounted volumes after the container exits&lt;/li&gt;
&lt;li&gt;
&lt;code&gt;angularapp:dev&lt;/code&gt; defines which image with which tag to run
&lt;/li&gt;
&lt;/ul&gt;
&lt;h3&gt;
  
  
  Issue of unaccessible exposed ports
&lt;/h3&gt;

&lt;p&gt;After executing the &lt;code&gt;docker run&lt;/code&gt; command the container is up and running. Running &lt;code&gt;docker ps&lt;/code&gt; confirms this.&lt;/p&gt;

&lt;p&gt;Using the container_id or container name and running &lt;code&gt;docker port {container_id/container name}&lt;/code&gt; shows that port 4200 of the host is mapped to the &lt;code&gt;0.0.0.0:4200&lt;/code&gt; of the running container &lt;br&gt;
(&lt;code&gt;4200/tcp -&amp;gt; 0.0.0.0:4200&lt;/code&gt;)&lt;/p&gt;

&lt;p&gt;But using &lt;code&gt;http://localhost:4200&lt;/code&gt; in the browser will not give any results. The browser tells the page is not available/accessible.&lt;/p&gt;

&lt;p&gt;Entering the container and verifying that the Angular local dev-server is running in the container and returning a valid HTML page is confirming that the container is working, access from the Docker host is the current issue&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;How to verify Angular dev-server is up and running
&lt;span class="o"&gt;&amp;gt;&lt;/span&gt; docker &lt;span class="nb"&gt;exec&lt;/span&gt; &lt;span class="nt"&gt;-it&lt;/span&gt; &lt;span class="o"&gt;{&lt;/span&gt;container_id/container name&lt;span class="o"&gt;}&lt;/span&gt; /bin/bash
&lt;span class="o"&gt;&amp;gt;&lt;/span&gt; curl localhost:4200
A valid HTML file should be visible 
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;The issue is that, if we check the &lt;a href="https://angular.io/cli/serve"&gt;Angular-cli docs&lt;/a&gt; for serving an application(&lt;code&gt;ng serve&lt;/code&gt;), the default host the dev-server listens too is &lt;code&gt;localhost&lt;/code&gt;. Unfortunately, an outside connection (from Docker host' browser) to the Docker container is not using &lt;code&gt;localhost&lt;/code&gt;&lt;/p&gt;

&lt;p&gt;If we add the following params to the &lt;code&gt;ng serve&lt;/code&gt; command to &lt;code&gt;ng serve --host 0.0.0.0&lt;/code&gt; and restart the docker container, using &lt;code&gt;http://localhost:4200&lt;/code&gt; in the Docker host browser should now work&lt;/p&gt;

</description>
      <category>todayilearned</category>
      <category>webdev</category>
      <category>docker</category>
      <category>angular</category>
    </item>
  </channel>
</rss>
