<?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>Forem: Vinícius Albuquerque</title>
    <description>The latest articles on Forem by Vinícius Albuquerque (@vsalbuq).</description>
    <link>https://forem.com/vsalbuq</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%2F399983%2F61097458-7d36-41f5-b168-2e602acf868f.png</url>
      <title>Forem: Vinícius Albuquerque</title>
      <link>https://forem.com/vsalbuq</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://forem.com/feed/vsalbuq"/>
    <language>en</language>
    <item>
      <title>How to use Docker Toolbox via WSL1 (Debian)</title>
      <dc:creator>Vinícius Albuquerque</dc:creator>
      <pubDate>Sun, 05 Jul 2020 00:33:00 +0000</pubDate>
      <link>https://forem.com/vsalbuq/how-to-use-docker-toolbox-via-wsl1-debian-5h1f</link>
      <guid>https://forem.com/vsalbuq/how-to-use-docker-toolbox-via-wsl1-debian-5h1f</guid>
      <description>&lt;h1&gt;
  
  
  Prerequisites
&lt;/h1&gt;

&lt;p&gt;I assume you have already installed Docker Toolbox in your machine. If you have not, please refer to &lt;a href="https://docs.docker.com/toolbox/toolbox_install_windows/"&gt;Docker's documentation&lt;/a&gt;.&lt;/p&gt;

&lt;h1&gt;
  
  
  Steps
&lt;/h1&gt;

&lt;h3&gt;
  
  
  1. Check your system's architecture and the version of your distro
&lt;/h3&gt;

&lt;p&gt;It needs to be &lt;code&gt;x86_64&lt;/code&gt;, &lt;code&gt;amd64&lt;/code&gt;, &lt;code&gt;armhf&lt;/code&gt; or &lt;code&gt;arm64&lt;/code&gt;. It also needs to be one of those two versions of Debian:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Debian Buster 10 (stable)&lt;/li&gt;
&lt;li&gt;Debian Stretch 9  / Raspbian Stretch&lt;/li&gt;
&lt;/ul&gt;

&lt;blockquote&gt;
&lt;p&gt;Of course you have to check it out if you're using another distro.&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;Run this on your WSL terminal to find out your system's architecture:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight"&gt;&lt;pre class="highlight shell"&gt;&lt;code&gt;&lt;span class="nb"&gt;uname&lt;/span&gt; &lt;span class="nt"&gt;-m&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;



&lt;p&gt;And run this to find out the version of your distro:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight"&gt;&lt;pre class="highlight shell"&gt;&lt;code&gt;&lt;span class="nb"&gt;cat&lt;/span&gt; /etc/os-release
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;



&lt;p&gt;It will return all the info you need to see if you can get everything working.&lt;/p&gt;

&lt;h3&gt;
  
  
  2. Install Docker client in your Debian distribution, via WSL
&lt;/h3&gt;

&lt;p&gt;To do that, just run these two commands:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight"&gt;&lt;pre class="highlight shell"&gt;&lt;code&gt;&lt;span class="nb"&gt;sudo &lt;/span&gt;apt-get update
&lt;span class="nb"&gt;sudo &lt;/span&gt;apt-get &lt;span class="nb"&gt;install &lt;/span&gt;docker-ce docker-ce-cli containerd.io
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;



&lt;p&gt;If you find something wrong along the line, maybe you are missing some features needed for the complete installation. Since the documentation includes steps you probably don't need if you have gone through some dev setup before, I cut it outhere. If you need, all those steps are also in &lt;a href="https://docs.docker.com/engine/install/debian/#install-using-the-repository"&gt;Docker's documentation&lt;/a&gt;.&lt;/p&gt;

&lt;h3&gt;
  
  
  3. Setup WSL start settings:
&lt;/h3&gt;

&lt;p&gt;Open &lt;code&gt;/etc/wsl.conf&lt;/code&gt; and paste this in it:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight"&gt;&lt;pre class="highlight plaintext"&gt;&lt;code&gt;[automount]
root = /
options = "metadata"
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;



&lt;p&gt;&lt;code&gt;root = /&lt;/code&gt; defines the drivers root at "/c" or "/d" instead of "/mnt/c". This is done to avoid conflicts, since MINGW64, which is used by Docker Toolbox's quickstart terminal, uses that path structure.&lt;/p&gt;

&lt;p&gt;&lt;code&gt;options= "metadata"&lt;/code&gt; adds the metadata of the files, meaning you enable WSL to know permissions for the file both on Linux and on Windows. This just gives you an extra security so that the permissions of the file on Linux can be respected.&lt;/p&gt;

&lt;h3&gt;
  
  
  4. Setup terminal settings
&lt;/h3&gt;

&lt;p&gt;Now, you must tell docker every time you run a command, where the host machine is. The host machine is the VM set up by Docker Toolbox's installer.&lt;/p&gt;

&lt;p&gt;To avoid that, and use the commands as you would do anywhere else, you're going to change the configuration file for your terminal. Since I'm using Oh My Zsh!, my &lt;code&gt;.zshrc&lt;/code&gt; file would do the trick.&lt;/p&gt;

&lt;p&gt;Run this to edit the file on VS Code:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight"&gt;&lt;pre class="highlight shell"&gt;&lt;code&gt;code ~/.zshrc
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;



&lt;blockquote&gt;
&lt;p&gt;If you are using just bash, you should use &lt;code&gt;~/.bashrc&lt;/code&gt;. You can also use nano or vim to edit it directly in the terminal.&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;Then paste this at the end of your file:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight"&gt;&lt;pre class="highlight plaintext"&gt;&lt;code&gt;export DOCKER_HOST="tcp://192.168.99.100:2376"
export DOCKER_TLS_VERIFY=1
export DOCKER_CERT_PATH="/c/Users/&amp;lt;your-user-name&amp;gt;/.docker/machine/certs"
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;



&lt;blockquote&gt;
&lt;p&gt;&lt;em&gt;OBS:&lt;/em&gt; Please change &lt;code&gt;&amp;lt;your-user-name&amp;gt;&lt;/code&gt; to your Windows user name.&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;This will set up environment variables that will tell Docker's client the settings it should use when running its commands.&lt;/p&gt;

&lt;p&gt;&lt;code&gt;DOCKER_HOST&lt;/code&gt; should have the IP and port used to access the VM. It is common that Docker Toolbox use that IP, but you should change if it is different from the one you see after opening Docker Quickstart Terminal.&lt;/p&gt;

&lt;p&gt;&lt;code&gt;DOCKER_TLS_VERIFY&lt;/code&gt; is saying it must be verified if all connections are using TLS protocol. It uses &lt;a href="https://en.wikipedia.org/wiki/Symmetric-key_algorithm"&gt;symmetric cryptography&lt;/a&gt; to ensure data security. So, &lt;code&gt;1&lt;/code&gt; is "ensure all connections are using TLS protocol" and &lt;code&gt;0&lt;/code&gt; is "I don't care if it is insecure, bring it on".&lt;/p&gt;

&lt;p&gt;&lt;code&gt;DOCKER_CERT_PATH&lt;/code&gt; tells where Docker can find the certificates used on the TLS connection. Those certificates contain the decryption keys necessary to understand the data that comes and goes through the connection.&lt;/p&gt;

&lt;h3&gt;
  
  
  5. Log out of your Windows user account and log in again
&lt;/h3&gt;

&lt;p&gt;This is needed so that the settings made to &lt;code&gt;wsl.conf&lt;/code&gt; are loaded.&lt;/p&gt;

&lt;h3&gt;
  
  
  6. Test if it worked
&lt;/h3&gt;

&lt;ul&gt;
&lt;li&gt;From Start menu, open Docker Quickstart Terminal;&lt;/li&gt;
&lt;li&gt;Wait until everything is fully loaded and you see the whale;&lt;/li&gt;
&lt;li&gt;Open Debian;&lt;/li&gt;
&lt;li&gt;Run &lt;code&gt;docker run hello-world&lt;/code&gt;.&lt;/li&gt;
&lt;/ul&gt;

&lt;h1&gt;
  
  
  Conclusion
&lt;/h1&gt;

&lt;p&gt;If you've followed the tutorial and need help at some point of it, please leave a comment. If you have found an answer to some problem you've had, please share with us.&lt;/p&gt;

</description>
      <category>docker</category>
      <category>bash</category>
      <category>wsl</category>
      <category>debian</category>
    </item>
    <item>
      <title>How to Install Oh My Zsh! on Windows 10 Home Edition</title>
      <dc:creator>Vinícius Albuquerque</dc:creator>
      <pubDate>Sat, 20 Jun 2020 19:31:16 +0000</pubDate>
      <link>https://forem.com/vsalbuq/how-to-install-oh-my-zsh-on-windows-10-home-edition-49g2</link>
      <guid>https://forem.com/vsalbuq/how-to-install-oh-my-zsh-on-windows-10-home-edition-49g2</guid>
      <description>&lt;p&gt;As a developer, some tools may be a game changer for your productivity, but sometimes we just need to work in an environment that makes things easier for us.&lt;/p&gt;

&lt;p&gt;If you're constantly making typos on commands, or everything being on the same color makes it difficult to see mistakes, it will not be a big deal when you analyze those mistakes alone. But in reality, those things pile up until you find it weird that you are so tired at the end of the day. And this happens because you are using a lot of your focus just to make sure everything is alright while you're working.&lt;/p&gt;

&lt;p&gt;I this tutorial, I'll show you how to set up a terminal that makes things easier while working, so that you can focus on what is really important and stop wasting your energy on small things.&lt;/p&gt;

&lt;p&gt;This is the result you should have at the end:&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%2Fi26hjs40ndcna3ezsxgf.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%2Fi26hjs40ndcna3ezsxgf.png" alt="terminal pic" width="800" height="449"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;&lt;strong&gt;Warning:&lt;/strong&gt; This tutorial is for people who are using Windows 10 Home Edition. It doesn't have Hyper-V, so the only way of having bash is via WSL1. &lt;strong&gt;If you have Hyper-V on your version, try installing WSL2.&lt;/strong&gt; The rest of steps of the tutorial may be the same, though.&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;At the end, you will have:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;An Oh My Zsh! terminal instance, with all the benefits it brings out of the box.&lt;/li&gt;
&lt;li&gt;Spaceship Prompt theme applied, so that you have cool highlighting and signs that show the current state of the git repository you're in (if there are things changed that were not staged, staged but not committed, etc.).&lt;/li&gt;
&lt;li&gt;Hyper as an alternative to open Oh My Zsh! with font ligature's feature.&lt;/li&gt;
&lt;li&gt;Visual Studio Code shell integration, so that you can use it inside the IDE.&lt;/li&gt;
&lt;li&gt;NVM and Node working on your terminal.&lt;/li&gt;
&lt;/ul&gt;

&lt;h1&gt;
  
  
  The Benefits
&lt;/h1&gt;

&lt;ul&gt;
&lt;li&gt;Automatic cd: Just type the name of the directory&lt;/li&gt;
&lt;li&gt;Recursive path expansion: For example “/u/lo/b” expands to “/usr/local/bin”&lt;/li&gt;
&lt;li&gt;Spelling correction and approximate completion: If you make a minor mistake typing a directory name, ZSH will fix it for you&lt;/li&gt;
&lt;li&gt;Plugin and theme support: ZSH includes many different plugin frameworks&lt;/li&gt;
&lt;/ul&gt;

&lt;h1&gt;
  
  
  1. Activate "Windows for Linux Subsystem" Feature
&lt;/h1&gt;

&lt;ul&gt;
&lt;li&gt;Run this script on PowerShell:&lt;/li&gt;
&lt;/ul&gt;

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

&lt;span class="nb"&gt;dism.exe&lt;/span&gt; &lt;span class="na"&gt;/online /enable-feature /featurename&lt;/span&gt;&lt;span class="nl"&gt;:Microsoft&lt;/span&gt;&lt;span class="na"&gt;-Windows-Subsystem-Linux /all /norestart


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

&lt;/div&gt;

&lt;ul&gt;
&lt;li&gt;Restart your machine.&lt;/li&gt;
&lt;/ul&gt;

&lt;h1&gt;
  
  
  2. Install a Linux Distribution
&lt;/h1&gt;

&lt;p&gt;You shouldn't have problems in this step. Just open Microsoft Store App and search for a distro. In my case, I installed Debian.&lt;/p&gt;

&lt;h1&gt;
  
  
  3. Install Zsh
&lt;/h1&gt;

&lt;p&gt;Open Debian from Start Menu. It will open a command prompt with the same features as Debian's terminal.&lt;/p&gt;

&lt;p&gt;If you try to run &lt;code&gt;sudo apt-get install zsh&lt;/code&gt; first, you may receive an error (&lt;code&gt;Unable to locate package zsh&lt;/code&gt;). So, first you should run these two commands:&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;$ &lt;/span&gt;&lt;span class="nb"&gt;sudo &lt;/span&gt;apt-get update
&lt;span class="nv"&gt;$ &lt;/span&gt;&lt;span class="nb"&gt;sudo &lt;/span&gt;apt-get upgrade


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

&lt;/div&gt;

&lt;p&gt;Now you will be able to install Zsh properly, running:&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;$ &lt;/span&gt;&lt;span class="nb"&gt;sudo &lt;/span&gt;apt-get &lt;span class="nb"&gt;install &lt;/span&gt;zsh


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

&lt;/div&gt;

&lt;p&gt;When the installation is done, run this:&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;$ &lt;/span&gt;zsh


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

&lt;/div&gt;

&lt;p&gt;This will walk you through some basic configuration for zsh.&lt;/p&gt;

&lt;h1&gt;
  
  
  4. Install Oh My Zsh!
&lt;/h1&gt;

&lt;p&gt;Install &lt;code&gt;curl&lt;/code&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;$ &lt;/span&gt;&lt;span class="nb"&gt;sudo &lt;/span&gt;apt-get &lt;span class="nb"&gt;install &lt;/span&gt;curl


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

&lt;/div&gt;

&lt;p&gt;Install Oh My Zsh!:&lt;/p&gt;

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

sh &lt;span class="nt"&gt;-c&lt;/span&gt; &lt;span class="s2"&gt;"&lt;/span&gt;&lt;span class="si"&gt;$(&lt;/span&gt;curl &lt;span class="nt"&gt;-fsSL&lt;/span&gt; https://raw.github.com/ohmyzsh/ohmyzsh/master/tools/install.sh&lt;span class="si"&gt;)&lt;/span&gt;&lt;span class="s2"&gt;"&lt;/span&gt;


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

&lt;/div&gt;

&lt;p&gt;While installing, it will ask if you want to set zsh as standard. Answer the prompt as you wish.&lt;/p&gt;

&lt;h1&gt;
  
  
  5. Set the theme Spaceship Prompt as default for Oh My Zsh!
&lt;/h1&gt;

&lt;p&gt;Install Git:&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;apt-get &lt;span class="nb"&gt;install &lt;/span&gt;git


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

&lt;/div&gt;

&lt;p&gt;Clone the theme's repository:&lt;/p&gt;

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

git clone https://github.com/denysdovhan/spaceship-prompt.git &lt;span class="s2"&gt;"&lt;/span&gt;&lt;span class="nv"&gt;$ZSH_CUSTOM&lt;/span&gt;&lt;span class="s2"&gt;/themes/spaceship-prompt"&lt;/span&gt;


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

&lt;/div&gt;

&lt;p&gt;Symlink spaceship.zsh-theme to your oh-my-zsh custom themes directory:&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;ln&lt;/span&gt; &lt;span class="nt"&gt;-s&lt;/span&gt; &lt;span class="s2"&gt;"&lt;/span&gt;&lt;span class="nv"&gt;$ZSH_CUSTOM&lt;/span&gt;&lt;span class="s2"&gt;/themes/spaceship-prompt/spaceship.zsh-theme"&lt;/span&gt; &lt;span class="s2"&gt;"&lt;/span&gt;&lt;span class="nv"&gt;$ZSH_CUSTOM&lt;/span&gt;&lt;span class="s2"&gt;/themes/spaceship.zsh-theme"&lt;/span&gt;


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

&lt;/div&gt;

&lt;p&gt;Now you must edit Zsh configuration file so that Oh My Zsh! uses this theme. If you already have Visual Studio Code installed, you can open the file using the code bellow:&lt;/p&gt;

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

code ~/.zshrc


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

&lt;/div&gt;

&lt;p&gt;Add this line at the end of your &lt;code&gt;.zshrc&lt;/code&gt; file:&lt;/p&gt;

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

Set ZSH_THEME="spaceship"

SPACESHIP_PROMPT_ORDER=(
  user          # Username section
  dir           # Current directory section
  host          # Hostname section
  git           # Git section (git_branch + git_status)
  hg            # Mercurial section (hg_branch  + hg_status)
  exec_time     # Execution time
  line_sep      # Line break
  vi_mode       # Vi-mode indicator
  jobs          # Background jobs indicator
  exit_code     # Exit code section
  char          # Prompt character
)
SPACESHIP_USER_SHOW=always
SPACESHIP_PROMPT_ADD_NEWLINE=false
SPACESHIP_CHAR_SYMBOL="❯"
SPACESHIP_CHAR_SUFFIX=" "


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

&lt;/div&gt;

&lt;p&gt;Before going ahead, you need to install Fira Code font. Follow the instructions &lt;a href="https://github.com/tonsky/FiraCode/wiki/Installing#windows" rel="noopener noreferrer"&gt;here&lt;/a&gt;.&lt;/p&gt;

&lt;h1&gt;
  
  
  6. Install Hyper Terminal
&lt;/h1&gt;

&lt;p&gt;You must have noticed the terminal is kinda buggy right now. It seems the fonts do not load properly. So, we will install Hyper to solve that problem. It will give you a pleasant experience, supporting all Spaceship Theme's features.&lt;/p&gt;

&lt;p&gt;Just go to &lt;code&gt;https://hyper.is&lt;/code&gt; and click the big download button, at the right on your screen. Then open it and follow the instructions.&lt;/p&gt;

&lt;p&gt;After that, open Hyper and its "Preferences" file (&lt;code&gt;Ctrl + ,&lt;/code&gt;).&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight json"&gt;&lt;code&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="err"&gt;...&lt;/span&gt;&lt;span class="w"&gt;
  &lt;/span&gt;&lt;span class="err"&gt;//&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="err"&gt;add&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="err"&gt;Fira&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="err"&gt;Code&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="err"&gt;as&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="err"&gt;first&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="err"&gt;font&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="err"&gt;in&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="err"&gt;font&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="err"&gt;family&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="err"&gt;with&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="err"&gt;optional&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="err"&gt;fallbacks&lt;/span&gt;&lt;span class="w"&gt;
  &lt;/span&gt;&lt;span class="err"&gt;fontFamily:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="err"&gt;'&lt;/span&gt;&lt;span class="s2"&gt;"Fira Code"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="err"&gt;Menlo&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s2"&gt;"DejaVu Sans Mono"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s2"&gt;"Lucida Console"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="err"&gt;monospace'&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="w"&gt;
  &lt;/span&gt;&lt;span class="err"&gt;...&lt;/span&gt;&lt;span class="w"&gt;
  &lt;/span&gt;&lt;span class="err"&gt;shell:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="err"&gt;'C:\\Users\\&amp;lt;your-user-name&amp;gt;\\AppData\\Local\\Microsoft\\WindowsApps\\debian.exe'&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="w"&gt;
  &lt;/span&gt;&lt;span class="err"&gt;shellArgs:&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="err"&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;/code&gt;&lt;/pre&gt;

&lt;/div&gt;

&lt;p&gt;&lt;em&gt;Important:&lt;/em&gt; &lt;em&gt;Change &lt;code&gt;&amp;lt;your-user-name&amp;gt;&lt;/code&gt; to your username on Windows&lt;/em&gt;. If you have installed other Linux distribution, change shell path accordingly. I believe all distributions installed via Microsoft Store will be at the same place, but I don't know for sure.&lt;/p&gt;

&lt;p&gt;&lt;em&gt;Another important thing:&lt;/em&gt; Your &lt;code&gt;shellArgs&lt;/code&gt; attribute must be an empty array, otherwise it will not work.&lt;/p&gt;

&lt;p&gt;I like the theme Dracula for Hyper. If you wish that too, add this on the config file too:&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight json"&gt;&lt;code&gt;&lt;span class="w"&gt;

&lt;/span&gt;&lt;span class="err"&gt;plugins:&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="err"&gt;'hyper-dracula'&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;/code&gt;&lt;/pre&gt;

&lt;/div&gt;
&lt;h1&gt;
  
  
  7. Add plugins to your terminal
&lt;/h1&gt;

&lt;p&gt;Now we're going to add some cool features:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;fast-syntax-highlighting: It adds syntax highlighting to your terminal, showing what typos you made;&lt;/li&gt;
&lt;li&gt;zsh-autosuggestions: It suggests commands as you type based on history (commands you've used before) and completions;&lt;/li&gt;
&lt;li&gt;zsh-completions: It adds thousands of completions for usual tools like Yarn, NVM, Node, etc, so that you need only to press &lt;code&gt;TAB&lt;/code&gt; to complete the command.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Fetch and run zinit script:&lt;/p&gt;
&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;

sh &lt;span class="nt"&gt;-c&lt;/span&gt; &lt;span class="s2"&gt;"&lt;/span&gt;&lt;span class="si"&gt;$(&lt;/span&gt;curl &lt;span class="nt"&gt;-fsSL&lt;/span&gt; https://raw.githubusercontent.com/zdharma/zinit/master/doc/install.sh&lt;span class="si"&gt;)&lt;/span&gt;&lt;span class="s2"&gt;"&lt;/span&gt;


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

&lt;/div&gt;

&lt;p&gt;Open zsh configuration file again:&lt;/p&gt;

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

code ~/.zshrc


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

&lt;/div&gt;

&lt;p&gt;Add this line at the end of your &lt;code&gt;.zshrc&lt;/code&gt; file:&lt;/p&gt;

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

zinit light zdharma/fast-syntax-highlighting
zinit light zsh-users/zsh-autosuggestions
zinit light zsh-users/zsh-completions


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

&lt;/div&gt;
&lt;h1&gt;
  
  
  8. Set up Visual Studio Code shell integration
&lt;/h1&gt;

&lt;ul&gt;
&lt;li&gt;Open Visual Studio Code&lt;/li&gt;
&lt;li&gt;&lt;code&gt;Ctrl + Shift + p&lt;/code&gt;&lt;/li&gt;
&lt;li&gt;Open settings JSON&lt;/li&gt;
&lt;li&gt;Add this line (or change it, if it already exists):&lt;/li&gt;
&lt;/ul&gt;
&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight json"&gt;&lt;code&gt;&lt;span class="w"&gt;

&lt;/span&gt;&lt;span class="nl"&gt;"terminal.integrated.shell.windows"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s2"&gt;"C:&lt;/span&gt;&lt;span class="se"&gt;\\&lt;/span&gt;&lt;span class="s2"&gt;Users&lt;/span&gt;&lt;span class="se"&gt;\\&lt;/span&gt;&lt;span class="s2"&gt;&amp;lt;your-user-name&amp;gt;&lt;/span&gt;&lt;span class="se"&gt;\\&lt;/span&gt;&lt;span class="s2"&gt;AppData&lt;/span&gt;&lt;span class="se"&gt;\\&lt;/span&gt;&lt;span class="s2"&gt;Local&lt;/span&gt;&lt;span class="se"&gt;\\&lt;/span&gt;&lt;span class="s2"&gt;Microsoft&lt;/span&gt;&lt;span class="se"&gt;\\&lt;/span&gt;&lt;span class="s2"&gt;WindowsApps&lt;/span&gt;&lt;span class="se"&gt;\\&lt;/span&gt;&lt;span class="s2"&gt;debian.exe"&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;&lt;em&gt;Important&lt;/em&gt;: Remember to change &lt;code&gt;&amp;lt;your-user-name&amp;gt;&lt;/code&gt; to your actual Windows user name.&lt;/p&gt;

&lt;h1&gt;
  
  
  9. Don't Forget to set up Node
&lt;/h1&gt;

&lt;p&gt;Some things you have installed on Windows will work already, but you'll have to install node specifically on your distro. We will use NVM (Node Version Manager) to have more freedom, if sometime we need to downgrade the version used keeping the other ones.&lt;/p&gt;

&lt;p&gt;First, we need to install the basic build tools for node-gyp.&lt;/p&gt;

&lt;p&gt;To do that, run this on your terminal:&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;$ &lt;/span&gt;&lt;span class="nb"&gt;sudo &lt;/span&gt;apt-get &lt;span class="nb"&gt;install &lt;/span&gt;build-essential


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

&lt;/div&gt;

&lt;p&gt;Then you'll have to download and run the script for installing NVM:&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;&lt;em&gt;Important:&lt;/em&gt; Before running this, check if it has the last version on the website (0.35.3).&lt;/p&gt;
&lt;/blockquote&gt;

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

curl &lt;span class="nt"&gt;-o-&lt;/span&gt; https://raw.githubusercontent.com/nvm-sh/nvm/v0.35.3/install.sh | bash


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

&lt;/div&gt;

&lt;p&gt;After that, close the terminal and open it again.&lt;/p&gt;

&lt;p&gt;Now, you'll add again some more settings to &lt;code&gt;.zshrc&lt;/code&gt; file.&lt;/p&gt;

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

code ~/.zshrc


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

&lt;/div&gt;

&lt;p&gt;Paste this code at the end of the file:&lt;/p&gt;

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

export NVM_DIR="$HOME/.nvm"
[ -s "$NVM_DIR/nvm.sh" ] &amp;amp;&amp;amp; \. "$NVM_DIR/nvm.sh"


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

&lt;/div&gt;

&lt;p&gt;To load the changes you've just made, run&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;source&lt;/span&gt; ~/.zshrc


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

&lt;/div&gt;

&lt;p&gt;Now, finally, we're ready to install node's lastest LTS version:&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;$ &lt;/span&gt;nvm &lt;span class="nb"&gt;install&lt;/span&gt; &lt;span class="nt"&gt;--lts&lt;/span&gt;


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

&lt;/div&gt;

&lt;p&gt;Set this version as the version nvm should use as standard:&lt;/p&gt;


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

&lt;p&gt;nvm use &lt;span class="nt"&gt;--lts&lt;/span&gt;&lt;/p&gt;

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

&lt;/div&gt;
&lt;h1&gt;
&lt;br&gt;
  &lt;br&gt;
  &lt;br&gt;
  Conclusion&lt;br&gt;
&lt;/h1&gt;

&lt;p&gt;Phew!!! If you endured until the end, congratulations. It was surely a long ride for me.&lt;/p&gt;

&lt;p&gt;I just want to highlight something before ending this article: The path structure for navigating folders is a little different.&lt;/p&gt;

&lt;p&gt;If you want to go to &lt;code&gt;C:\Users\MyUserName\Documents\awesome-repo&lt;/code&gt;, for example, you will use &lt;code&gt;cd /mnt/c/Users/MyUserName/Documents/awesome-repo&lt;/code&gt;.&lt;/p&gt;

&lt;p&gt;&lt;em&gt;This means your drives are at &lt;code&gt;/mnt/&lt;/code&gt;&lt;/em&gt;. From there, the path structure is pretty much the same.&lt;/p&gt;

&lt;p&gt;I hope this was helpful to someone.&lt;/p&gt;

&lt;p&gt;If something didn't work for you, or even if you have found a workaround for some specific problem, please leave a comment and I'll update this article as soon as possible. I'm sure it will help someone who passes by in the future.&lt;/p&gt;

</description>
      <category>zsh</category>
      <category>terminal</category>
      <category>git</category>
      <category>vscode</category>
    </item>
    <item>
      <title>Setting up a Full-Stack TypeScript Web App Monorepo with Live Reload</title>
      <dc:creator>Vinícius Albuquerque</dc:creator>
      <pubDate>Tue, 02 Jun 2020 00:04:53 +0000</pubDate>
      <link>https://forem.com/vsalbuq/setting-up-a-full-stack-typescript-web-app-monorepo-with-live-reload-3ld0</link>
      <guid>https://forem.com/vsalbuq/setting-up-a-full-stack-typescript-web-app-monorepo-with-live-reload-3ld0</guid>
      <description>&lt;p&gt;This is a how-to article (and a very straight-to-the-point one). It is so straight forward that it is almost only a checklist. But if you do the spells correctly, some magic will happen.&lt;/p&gt;

&lt;p&gt;If you want to see the pros and cons for setting up a monorepo architecture, using TypeScript or even how live reload makes you more productive as a developer, you're not going to get it here. I plan writing about that (and other explanations about things I did here) later, so... &lt;/p&gt;

&lt;p&gt;Follow me and you'll get a notification when I post it 😅!  &lt;/p&gt;

&lt;p&gt;In this post I show how to set up:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;A monorepo project using Yarn Workspaces;&lt;/li&gt;
&lt;li&gt;An Node.js server using Express and Typescript with live reload;&lt;/li&gt;
&lt;li&gt;A React app with Typescript;&lt;/li&gt;
&lt;li&gt;A sexy &lt;code&gt;package.json&lt;/code&gt; to start everything using a single command in the root folder.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Ready? Let's go!&lt;/p&gt;

&lt;h1&gt;
  
  
  Prerequisites
&lt;/h1&gt;

&lt;ul&gt;
&lt;li&gt;You must have Node.js installed in your machine. You can do that via &lt;a href="https://nodejs.org/en/download/package-manager/"&gt;package manager&lt;/a&gt; or just &lt;a href="https://nodejs.org/en/download/"&gt;download the best installer for your SO&lt;/a&gt;.&lt;/li&gt;
&lt;li&gt;You must have Yarn installed. Install &lt;a href="https://yarnpkg.com/getting-started/install#global-install"&gt;here&lt;/a&gt;.&lt;/li&gt;
&lt;/ul&gt;

&lt;h1&gt;
  
  
  Monorepo
&lt;/h1&gt;

&lt;ul&gt;
&lt;li&gt;Create a folder for your project, with the name you want for the repository.&lt;/li&gt;
&lt;li&gt;Open the terminal on that folder and run &lt;code&gt;yarn init -y&lt;/code&gt;.&lt;/li&gt;
&lt;li&gt;Open the recently created &lt;code&gt;package.json&lt;/code&gt; file and add &lt;code&gt;"private": true,&lt;/code&gt; and &lt;code&gt;"workspaces": { "packages": ["packages/*"]}&lt;/code&gt; to it. It will be somewhat like this:
&lt;/li&gt;
&lt;/ul&gt;

&lt;div class="highlight"&gt;&lt;pre class="highlight json"&gt;&lt;code&gt;&lt;span class="p"&gt;{&lt;/span&gt;&lt;span class="w"&gt;
  &lt;/span&gt;&lt;span class="nl"&gt;"name"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s2"&gt;"MySexyProject"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="w"&gt;
  &lt;/span&gt;&lt;span class="nl"&gt;"version"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s2"&gt;"1.0.0"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="w"&gt;
  &lt;/span&gt;&lt;span class="nl"&gt;"main"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s2"&gt;"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;"license"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s2"&gt;"MIT"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="w"&gt;
  &lt;/span&gt;&lt;span class="nl"&gt;"private"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="kc"&gt;true&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="w"&gt;
  &lt;/span&gt;&lt;span class="nl"&gt;"workspaces"&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;"packages"&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="s2"&gt;"packages/*"&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="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;/code&gt;&lt;/pre&gt;&lt;/div&gt;



&lt;ul&gt;
&lt;li&gt;Create a folder &lt;code&gt;packages&lt;/code&gt;. You will put all projects of this repository inside that folder.&lt;/li&gt;
&lt;/ul&gt;

&lt;h1&gt;
  
  
  Server
&lt;/h1&gt;

&lt;ul&gt;
&lt;li&gt;Create a folder called &lt;code&gt;server&lt;/code&gt; inside of the folder &lt;code&gt;packages&lt;/code&gt;. Your folder structure will be something like this:
&lt;/li&gt;
&lt;/ul&gt;

&lt;div class="highlight"&gt;&lt;pre class="highlight plaintext"&gt;&lt;code&gt;📂- root
 └📂- packages
 | └📂- server (👋🏻 I'm here!)
 └📝- package.json
 └📝- yarn.lock
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;



&lt;ul&gt;
&lt;li&gt;Open the terminal in &lt;code&gt;server&lt;/code&gt; folder and run:

&lt;ul&gt;
&lt;li&gt;&lt;code&gt;yarn init -y&lt;/code&gt;&lt;/li&gt;
&lt;li&gt;&lt;code&gt;yarn add typescript -D&lt;/code&gt;&lt;/li&gt;
&lt;li&gt;&lt;code&gt;yarn tsc --init&lt;/code&gt;&lt;/li&gt;
&lt;li&gt;&lt;code&gt;yarn add express&lt;/code&gt;&lt;/li&gt;
&lt;li&gt;&lt;code&gt;yarn add @types/express -D&lt;/code&gt;&lt;/li&gt;
&lt;li&gt;&lt;code&gt;yarn add ts-node -D&lt;/code&gt;&lt;/li&gt;
&lt;li&gt;&lt;code&gt;yarn add ts-node-dev -D&lt;/code&gt;&lt;/li&gt;
&lt;/ul&gt;


&lt;/li&gt;
&lt;li&gt;Create the folder and the TypeScript file which will be the starting point of your server application. In this example, it will be &lt;code&gt;packages/server/src/server.ts&lt;/code&gt;.
&lt;/li&gt;
&lt;/ul&gt;

&lt;div class="highlight"&gt;&lt;pre class="highlight typescript"&gt;&lt;code&gt;&lt;span class="k"&gt;import&lt;/span&gt; &lt;span class="nx"&gt;express&lt;/span&gt; &lt;span class="k"&gt;from&lt;/span&gt; &lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;express&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;

&lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="nx"&gt;app&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="nx"&gt;express&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="kd"&gt;get&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;/&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="p"&gt;,(&lt;/span&gt;&lt;span class="nx"&gt;req&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="nx"&gt;res&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;res&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;json&lt;/span&gt;&lt;span class="p"&gt;({&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;message&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;Hello World!&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="p"&gt;});&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="mi"&gt;3333&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;



&lt;ul&gt;
&lt;li&gt;On &lt;code&gt;packages/server/package.json&lt;/code&gt;, add this script:
&lt;/li&gt;
&lt;/ul&gt;

&lt;div class="highlight"&gt;&lt;pre class="highlight json"&gt;&lt;code&gt;&lt;span class="w"&gt;  &lt;/span&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;"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;"ts-node-dev src/server.ts"&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;ul&gt;
&lt;li&gt;Now, open a terminal on this folder and run &lt;code&gt;yarn dev&lt;/code&gt;.&lt;/li&gt;
&lt;li&gt;🎉 🎉 🎉 🎉 🎉&lt;/li&gt;
&lt;/ul&gt;

&lt;h1&gt;
  
  
  Web
&lt;/h1&gt;

&lt;ul&gt;
&lt;li&gt;Go to the root of your monorepo and open the terminal there.&lt;/li&gt;
&lt;li&gt;Run &lt;code&gt;yarn create react-app packages\web --template=typescript&lt;/code&gt; and wait this never-ending script to finish.&lt;/li&gt;
&lt;li&gt;Done.&lt;/li&gt;
&lt;/ul&gt;

&lt;h1&gt;
  
  
  🧙🏻‍♂️Running everything with one command
&lt;/h1&gt;

&lt;ul&gt;
&lt;li&gt;Open the terminal at monorepo's root folder.&lt;/li&gt;
&lt;li&gt;Run &lt;code&gt;yarn add npm-run-all -D -W&lt;/code&gt;.&lt;/li&gt;
&lt;li&gt;Open monorepo's &lt;code&gt;package.json&lt;/code&gt; and add the scripts bellow:
&lt;/li&gt;
&lt;/ul&gt;

&lt;div class="highlight"&gt;&lt;pre class="highlight json"&gt;&lt;code&gt;&lt;span class="w"&gt;  &lt;/span&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;"server-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;"yarn workspace server dev"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="w"&gt;
    &lt;/span&gt;&lt;span class="nl"&gt;"web-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;"yarn workspace web start"&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;"run-p server-dev web-dev"&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;/code&gt;&lt;/pre&gt;&lt;/div&gt;



&lt;ul&gt;
&lt;li&gt;Now run &lt;code&gt;yarn start&lt;/code&gt; and see the magic happening ✨ ✨ ✨&lt;/li&gt;
&lt;/ul&gt;

&lt;blockquote&gt;
&lt;p&gt;P.S.: If you don't want to add that dependency and you are using Windows' CMD or PowerShell, you can achieve a similar result using &lt;code&gt;start yarn workspace server dev &amp;amp;&amp;amp; start yarn workspace web start&lt;/code&gt;, but it will open two terminal windows and each of them will run one of the scripts.&lt;/p&gt;
&lt;/blockquote&gt;

</description>
      <category>typescript</category>
      <category>node</category>
      <category>react</category>
      <category>reactnative</category>
    </item>
  </channel>
</rss>
