<?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: Marouen Helali</title>
    <description>The latest articles on Forem by Marouen Helali (@marwan01).</description>
    <link>https://forem.com/marwan01</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%2F332818%2F66c3de96-af9a-480f-bc19-743127c8edd0.gif</url>
      <title>Forem: Marouen Helali</title>
      <link>https://forem.com/marwan01</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://forem.com/feed/marwan01"/>
    <language>en</language>
    <item>
      <title>Exporting your Firebase Auth Users with Golang and Firebase-CLI</title>
      <dc:creator>Marouen Helali</dc:creator>
      <pubDate>Fri, 10 Feb 2023 17:04:02 +0000</pubDate>
      <link>https://forem.com/marwan01/exporting-your-firebase-auth-users-with-golang-and-firebase-cli-n5e</link>
      <guid>https://forem.com/marwan01/exporting-your-firebase-auth-users-with-golang-and-firebase-cli-n5e</guid>
      <description>&lt;p&gt;How to extract the emails of your Firebase app users in a format readable by most email delivery services such as MailChimp and MailGun.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.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%2Fgcz6rs6extvdmksg0jlm.gif" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.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%2Fgcz6rs6extvdmksg0jlm.gif" alt="https://webintegral.com.co/blog/como-ingresar-a-firebase-y-activar-el-plan-pago/firebase-gif/" width="480" height="395"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;TL;DR: &lt;a href="https://github.com/Marwan01/import-firebase-users" rel="noopener noreferrer"&gt;https://github.com/Marwan01/import-firebase-users&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Dependencies&lt;/strong&gt;&lt;br&gt;
Go&lt;br&gt;
firebase-cli&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Firebase CLI&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;Download and install firebase-cli: &lt;a href="https://firebase.google.com/docs/cli" rel="noopener noreferrer"&gt;https://firebase.google.com/docs/cli&lt;/a&gt;&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;brew install firebase-cli
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Login to firebase-cli:&lt;br&gt;
&lt;/p&gt;

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

&lt;/div&gt;



&lt;p&gt;Get your project ID:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;firebase projects:list
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Run the command to get your auth users data:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;firebase auth:export save_file.csv --format=csv --project &amp;lt;PROJECT_ID&amp;gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;You should now have a csv save_file.csv that has all your users’ emails along with a bunch of scrambled extra data.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Golang Implementation&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;To get started, create a new Directory/Git Repository, and initialize and Go project within it:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;mkdir import-firebase-users
cd import-firebase-users
touch splitclean.go
go mod init
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Let’s start by adding the skeleton code for our service:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;package main
import (
 "fmt"
)
func main() {
 fmt.Println("Firebase email export start.")
}
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Let’s test our execution by running go run splitclean.go . We should expect to see in stdout: Firebase email export start .&lt;/p&gt;

&lt;p&gt;Now we can start working on the main course of the script, which is getting the data csv from Firebase and cleaning it up. First let’s open and parse the csv into a reader that we can loop over and extract emails from:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt; // Open the file
 csvfile, err := os.Open("save_file.csv")
 if err != nil {
  log.Fatalln("Couldn't open the csv file", err)
 }

 // Parse the file
 r := csv.NewReader(csvfile)
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Then let’s create an emails slice, and loop over the reader, and pick out the record that has the email:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt; var emails []string
 // Iterate through the records
 for {
  // Read each record from csv
  record, err := r.Read()
  if err == io.EOF {
   break
  }
  if err != nil {
   log.Fatal(err)
  }
  emails = append(emails, record[1])
 }
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Now let’s create a .txt file and write a header column Email Address . This is required by most mail services, and makes it automatically convertible to .csv with a header, if that’s what you want to work with.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt; // Create a .txt file
 f, err := os.Create("emails.txt")

 if err != nil {
  log.Fatal(err)
 }
 // write header for the file
 _, _ = f.WriteString("Email Address\n")
 // close file when done
 defer f.Close()
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Now for the last step, let’s loop over the email slice and add each email to its own line on the .txt file:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;// loop over the emails slice
for i := 0; i &amp;lt; len(emails); i++ {
  _, err2 := f.WriteString(emails[i])
  _, _ = f.WriteString("\n")
  if err2 != nil {
   log.Fatal(err2)
  }
 }
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;strong&gt;(Optional) Bash Script&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;We can simplify the execution one more step, by adding a two command bash script that will call the firebase-cli with a a Project ID parameter, and the your Golang script:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;touch entrypoint.sh
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Add the two commands:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;firebase auth:export save_file.csv --format=csv --project $1
go run splitclean.go
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Make your script executable:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;chmod +x entrypoint.sh
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Finally run the script:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;./entrypoint.sh &amp;lt;firebase project ID&amp;gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



</description>
      <category>vibecoding</category>
    </item>
    <item>
      <title>Terraform Credentials Setup in GCP</title>
      <dc:creator>Marouen Helali</dc:creator>
      <pubDate>Fri, 10 Feb 2023 14:28:51 +0000</pubDate>
      <link>https://forem.com/marwan01/terraform-credentials-setup-in-gcp-11n</link>
      <guid>https://forem.com/marwan01/terraform-credentials-setup-in-gcp-11n</guid>
      <description>&lt;h1&gt;
  
  
  This article will cover how to create a terraform service-account in Google Cloud Platform, and how to generate and use its credentials locally.
&lt;/h1&gt;

&lt;p&gt;We are going to need to authenticate to GCP to use terraform. The recommended way to do that according to the Google Cloud Platform Documentation, is to create a service account for terraform, and give it the necessary access for it to create infrastructure.&lt;/p&gt;

&lt;p&gt;If you haven’t already, run the below command to initialize your GCP workspace and select a default GCP project. Grab your &lt;code&gt;PROJECT_ID&lt;/code&gt; .&lt;br&gt;
&lt;/p&gt;

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

&lt;/div&gt;



&lt;p&gt;Now that you are logged in to GCP and have your &lt;code&gt;PROJECT_ID&lt;/code&gt; saved, create a new service account to be used by terraform.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;gcloud iam service-accounts create terraform  --display-name "Terraform account"
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Now that your terraform service account is created, generate the config locally so we can use it to authenticate to GCP as the terraform service acct. Do not forget to substitute &lt;code&gt;PROJECT_ID&lt;/code&gt; with your own value.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;gcloud iam service-accounts keys create ~/.config/gcloud/PROJECT_ID.json --iam-account terraform@$PROJECT_ID.iam.gserviceaccount.com
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Note: you will need to re-generate the credential file via this step every time you add new access permissions to the chosen service account.&lt;/p&gt;

&lt;p&gt;We now have a terraform service account, and its corresponding credentials pulled locally. The next step is to configure your environment for the Google Cloud Terraform provider by substitution your &lt;code&gt;PROJECT_ID&lt;/code&gt; value and running&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;export GOOGLE_APPLICATION_CREDENTIALS=~/.config/gcloud/PROJECT_ID.json
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;The terraform command is finally ready to be used. It is now able to correctly link to the terraform service account we created using the above exported credentials. However, the “fresh” service-account, does not have any permissions given to it. So terraform is not going to be authorized to create any infrastructure unless we give it permission to do so. You might need to find out which permission needed for your chosen infrastructure, but for a GCS bucket example, below is how we add the permissions needed to the terraform service account. Do not forget to change &lt;code&gt;PROJECT_ID&lt;/code&gt; to your own value.&lt;/p&gt;

&lt;h2&gt;
  
  
  Grant the service account permission to view the GCP Project
&lt;/h2&gt;



&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;gcloud projects add-iam-policy-binding PROJECT_ID --member serviceAccount:terraform@PROJECT_ID.iam.gserviceaccount.com --role roles/viewer
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h2&gt;
  
  
  Grant the service account permission to manage Cloud Storage
&lt;/h2&gt;



&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;gcloud projects add-iam-policy-binding PROJECT_ID --member serviceAccount:terraform@PROJECT_ID.iam.gserviceaccount.com --role roles/storage.admin
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;If you encounter any billing issues, it is probably because the corresponding service does not have billing enabled. You can fix that by enabling all the APIs required for terraform to perform needed actions.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;gcloud services enable cloudresourcemanager.googleapis.com
gcloud services enable cloudbilling.googleapis.com
gcloud services enable iam.googleapis.com
gcloud services enable storage.googleapis.com
gcloud services enable serviceusage.googleapis.com
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;You can now run terraform init with an existing terraform config to test the connection to GCP and verify the permissions are set up correctly.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.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%2Fp5hqbo9ohbakg4kzmoaf.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.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%2Fp5hqbo9ohbakg4kzmoaf.png" alt="Image description" width="800" height="435"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;successful terraform init&lt;br&gt;
Tada 🎉🎉🎉 You now meet all the necessary conditions to be able to run a terraform plan.&lt;/p&gt;

</description>
      <category>security</category>
      <category>discuss</category>
    </item>
    <item>
      <title>Customize Your Mac Terminal</title>
      <dc:creator>Marouen Helali</dc:creator>
      <pubDate>Thu, 21 Jan 2021 02:25:32 +0000</pubDate>
      <link>https://forem.com/marwan01/customize-your-mac-terminal-5ebi</link>
      <guid>https://forem.com/marwan01/customize-your-mac-terminal-5ebi</guid>
      <description>&lt;p&gt;Original Source: &lt;a href="https://medium.com/@marouen.helali/customize-your-mac-terminal-5baa3ec308f0" rel="noopener noreferrer"&gt;https://medium.com/@marouen.helali/customize-your-mac-terminal-5baa3ec308f0&lt;/a&gt;&lt;/p&gt;

&lt;h4&gt;
  
  
  &lt;strong&gt;Learn how to personalize your Mac terminal in 5 simple steps.&lt;/strong&gt;
&lt;/h4&gt;

&lt;p&gt;&lt;em&gt;Customizing your terminal can simplify a lot of your tasks, and set you up with basic shortcuts that will save you from some headaches, especially if you spend a lot of time using CLIs. We can break down this process into 5 major steps: Picking a terminal program, adding terminal plugins, picking a shell program, adding shell plugins, and configuring your terminal editor. This article will walk you through each of the steps in detail.&lt;/em&gt;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;1. Pick a terminal program: &lt;em&gt;hyper.js&lt;/em&gt; 🤖&lt;/strong&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%2Fdev-to-uploads.s3.amazonaws.com%2Fi%2Fk6s8df4u5mmn75o8arax.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%2Fi%2Fk6s8df4u5mmn75o8arax.png" alt="1*E_lGNIQYPW3RjcCJrD-few"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h6&gt;
  
  
  Default Mac terminal. It comes natively with every Mac
&lt;/h6&gt;

&lt;p&gt;Each user is free to choose their favorite terminal software since each program has its own pros and cons. However, they generally do not differ too much, except for plugins and such. My favorite terminal interface is the hyper terminal. It is very customizable and allows us to easily add powerful plugins (which will be covered in part 2). To install hyper, navigate to the website and click the download button. Follow the instructions on the screen to finalize the installation of hyper.&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%2Fi%2Fk18jax68o6246xivj22a.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%2Fi%2Fk18jax68o6246xivj22a.png" alt="1*LlbTb1MkG5nQaL5AaEIAGQ"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h6&gt;
  
  
  Last installation step
&lt;/h6&gt;

&lt;p&gt;Now search for Hyper, and launch it.&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%2Fdev-to-uploads.s3.amazonaws.com%2Fi%2Fnzbksp4m2ye7c86t3aj1.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%2Fi%2Fnzbksp4m2ye7c86t3aj1.png" alt="1*AbPRIkUkebZzhMgAzKbg5Q"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h6&gt;
  
  
  Searching for Hyper after the installation
&lt;/h6&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%2Fi%2Fob20seazeroqii3lww1n.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%2Fi%2Fob20seazeroqii3lww1n.png" alt="1*9ag6wGqCD6wDGreLU_7pDQ"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h6&gt;
  
  
  Hyper terminal
&lt;/h6&gt;

&lt;p&gt;It is worthwhile to mention that the native Mac terminal is also a great lightweight option that also allows us to add plugins and optimizations. Another popular third party software is the &lt;a href="https://iterm2.com" rel="noopener noreferrer"&gt;iterm2&lt;/a&gt; terminal.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;2. Add some plugins 🔌&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;Hyper is very customizable. It offers a growing &lt;a href="https://hyper.is/plugins" rel="noopener noreferrer"&gt;list of plugins&lt;/a&gt;. Installing a new plugin is simple. All you need to do is edit your &lt;em&gt;.hyper.js&lt;/em&gt; file. Note:&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;Many terminal programs allow you to customize some settings and parameters about them via their "dotfiles". Dotfiles stand for the config files that start with a dot and are usually located within your root directory.&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;Based on the above note, we can deduce that the .hyper.js file came from the installation of the hyper terminal. We will also end up with more dotfiles as we install more programs.&lt;br&gt;
Use your favorite editor to open the .hyper.js files (located in your system's root directory ~/.hyper.js). For this tutorial, we will use Vim (we will also be adding some extensions to improve the vim experience in part 5). If you are not familiar with vim, take a look at my getting started with Vim article for a quick cumulative intro to the topic.&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;vim ~/.hyper.js
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;

&lt;p&gt;Let's start by adding one of my favorite Hyper plugins: &lt;a href="https://hyper.is/store/hyper-pane" rel="noopener noreferrer"&gt;hyper-pane&lt;/a&gt;. After opening the config file, scroll down to the bottom of it and you will find a plugins array. Add a new string to it with the value of your chosen plugin.&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%2Fi%2Fffqvikd63oqjyu548sn9.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%2Fi%2Fffqvikd63oqjyu548sn9.png" alt="1*NgdxYvsUJO01DijdiFzRbA"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h6&gt;
  
  
  Adding hyper-pane to plugins array via vim
&lt;/h6&gt;

&lt;p&gt;Relaunch the program and hyper will reload itself after installing the plugin. Congrats you installed your first plugin! Hyper-pane is simple to use, but the shortcuts can be easily forgotten (speaking from experience lol). Below are the most important commands, feel free to copy them to your notes:&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;Vertical Pane: CMD + D
Horizontal Pane: CMD + SHIFT + D
Close Pane: CMD + W
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;

&lt;p&gt;Now that you know how to add plugins, knock yourself out by adding any &lt;a href="https://hyper.is/plugins/newest" rel="noopener noreferrer"&gt;new plugins you'd like&lt;/a&gt;, here is a nice cumulative list of &lt;strong&gt;very useful plugins&lt;/strong&gt;:&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;plugins: [
     'hypercwd',
     'hyper-alt-click',
     "hyper-search",
     "hyper-pane",
     "hyper-active-tab",
     "hyper-highlight-active-pane"
   ],
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;

&lt;p&gt;All these plugins are useful, for example, &lt;a href="https://hyper.is/store/hypercwd" rel="noopener noreferrer"&gt;Hypercwd&lt;/a&gt; allows you to open new tabs at the same directory you were in. You can learn more about how to use each plugin, and their functionality by looking at the specific plugin details within the &lt;a href="https://hyper.is/plugins/newest" rel="noopener noreferrer"&gt;list of plugins&lt;/a&gt;.&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%2Fi%2Fghxqfk2as4el03nkk21p.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%2Fi%2Fghxqfk2as4el03nkk21p.png" alt="1*GFS7aCW5jpQv6SFxHjGOrw"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h6&gt;
  
  
  Full list of favorite plugins
&lt;/h6&gt;

&lt;p&gt;&lt;strong&gt;3. Installing a different terminal shell 🐚&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;Now that you have a powerful terminal, let's equip you with the best shell out there. Mac's default command-line shell is called &lt;strong&gt;bash&lt;/strong&gt;. Bash is great, but it will be lacking some of the performance improvements, extensions, and updates that come from more optimized, open-source shells such as the almighty &lt;a href="https://github.com/ohmyzsh/ohmyzsh" rel="noopener noreferrer"&gt;oh-my-zsh&lt;/a&gt;. You can install it by running:&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;sh -c "$(curl -fsSL     https://raw.githubusercontent.com/ohmyzsh/ohmyzsh/master/tools/install.sh)"
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;

&lt;p&gt;Feel free to refer to the &lt;a href="https://github.com/ohmyzsh/ohmyzsh/blob/master/README.md" rel="noopener noreferrer"&gt;Github README.md&lt;/a&gt; for more details about the installation. Follow the installation steps, restart your terminal, and boom! You now have zsh! Note that will this installation brings a new dotfile (.zshrc).&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;4. Add zsh plugins 🔌&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;The main reason for choosing the zsh shell might just be its plugins. This step is the most valuable of all. Just like we edited the .hyper.js to add some plugins to the hyper terminal, we will be editing the .zshrc to add useful tools:&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;vim ~/.zshrc
&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%2Fi%2Fo2srk442w81chtebc02e.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%2Fi%2Fo2srk442w81chtebc02e.png" alt="1*R3SBSZnitTwYGxV9opaYqw"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h6&gt;
  
  
  What default .zshrc looks like. Source: &lt;a href="https://github.com/ohmyzsh/ohmyzsh/blob/master/templates/zshrc.zsh-template" rel="noopener noreferrer"&gt;https://github.com/ohmyzsh/ohmyzsh/blob/master/templates/zshrc.zsh-template&lt;/a&gt;
&lt;/h6&gt;

&lt;p&gt;The list of &lt;a href="https://github.com/ohmyzsh/ohmyzsh/tree/master/plugins" rel="noopener noreferrer"&gt;zsh plugins&lt;/a&gt; is exhaustive. However, the most indispensable plugins are these:&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;plugins=( 
    git 
    zsh-autosuggestions 
    zsh-syntax-highlighting 
)
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;

&lt;p&gt;Once you are done editing your .zshrc, you will need to source your .zshrc for any changes to take effect:&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;source ~/.zshrc
&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%2Fi%2Fqwr7xo32s4nu77tjbc8e.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%2Fi%2Fqwr7xo32s4nu77tjbc8e.png" alt="1*OwyBApr8waio3g6427A3Qw"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h6&gt;
  
  
  Sourcing your .zsh and cloning plugins' repos
&lt;/h6&gt;

&lt;p&gt;You might encounter: plugin 'zsh-autosuggestions' not found. This is normal because unlike hyper (&lt;strong&gt;Javascript-based&lt;/strong&gt;) which automatically takes care of doing the plugin imports for us, we will need to download the plugins ourselves. We do it by cloning the source for the plugin into the dedicated zsh plugin directory via these &lt;strong&gt;commands&lt;/strong&gt; (for the two above plugins):&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;# Download zsh-autosuggestions
git clone https://github.com/zsh-users/zsh-    autosuggestions.git $ZSH_CUSTOM/plugins/zsh-autosuggestions
# Download zsh-syntax-highlighting
git clone https://github.com/zsh-users/zsh-syntax-    highlighting.git $ZSH_CUSTOM/plugins/zsh-syntax-    highlighting
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;

&lt;p&gt;Zsh auto-suggestions will allow you to use the right arrow to fill commands based on your terminal history, while syntax-highlighting will highlight in green commands that are recognized by your shell, and in red those that are expected to error from syntax issues. Here is a quick look at the two plugins:&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%2Fi%2Fb2zhyb2lb3py102d7il1.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%2Fi%2Fb2zhyb2lb3py102d7il1.png" alt="1*k_3I-XQqrxPBaf7RP1kA4Q"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h6&gt;
  
  
  Zsh auto-suggestions demo
&lt;/h6&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%2Fi%2Fh05ujtsoszr04n8tjhk1.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%2Fi%2Fh05ujtsoszr04n8tjhk1.png" alt="1*aidLnYzqAhuwbkBJ6HHNUA"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h6&gt;
  
  
  Zsh syntax-highlighting demo
&lt;/h6&gt;

&lt;p&gt;It might be fun to change the .zsh theme. Here is the long &lt;a href="https://github.com/ohmyzsh/ohmyzsh/wiki/Themes" rel="noopener noreferrer"&gt;list of themes&lt;/a&gt;. You can do this simply by updating the theme variable in the .zsh file:&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;vim ~/.zshrc
&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%2Fi%2Fckizi9db6nfnpd64oteq.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%2Fi%2Fckizi9db6nfnpd64oteq.png" alt="1*MgDBEEr-O8ai4Ln-kEKEVA"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Finally, it might not be a bad idea to scroll through the rest of the parameters and options within the .zshrc file. It is very well documented and you might find a setting that will appeal to your usage.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;5. Tweak your text editor: vim 📝&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;In this section, I will be using vim (staying within the terminal), but keep in mind that editing other popular text code editors such as VSCode is just as similar (update your .vscode config file).&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;vim ~/.vimrc
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;

&lt;p&gt;You might have some sample configuration there, or it could be empty. In either case, a very neat vim config (that I personally use) is presented in this &lt;a href="https://gist.github.com/simonista/8703722" rel="noopener noreferrer"&gt;gist&lt;/a&gt;. You can copy it and paste it into your .vimrc file. You can reload your terminal, and open vim again, and you will see the new settings such as line numbers, and separate variable colors taking effect.&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%2Fi%2Fxsor1wigwbgevdy2p5id.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%2Fi%2Fxsor1wigwbgevdy2p5id.png" alt="1*o7HhvmQk3CdChRlfEGwhFA"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h6&gt;
  
  
  To the left is Vim after adding the gist config. To the right is the original look of Vim
&lt;/h6&gt;

&lt;p&gt;In conclusion, editing your terminal is not much different from setting up your favorite software workspace on your computer. It is just a matter of picking an adequate program for your functions, learning how to use it, and finally learning how to configure it so you can get the most out of it by simplifying and automating its usage.&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%2Fi%2Foumpkuk69oskppspezd1.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%2Fi%2Foumpkuk69oskppspezd1.png" alt="1*V26p2j3MQbyHy5zHual_9g"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Source: &lt;a href="https://giphy.com/gifs/season-17-the-simpsons-17x10-3orif2MpoMCp4IVXKU" rel="noopener noreferrer"&gt;https://giphy.com/gifs/season-17-the-simpsons-17x10-3orif2MpoMCp4IVXKU&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Cover source: &lt;a href="https://unsplash.com/photos/zDxlNcdUzxk" rel="noopener noreferrer"&gt;https://unsplash.com/photos/zDxlNcdUzxk&lt;/a&gt;&lt;/p&gt;

</description>
      <category>mac</category>
      <category>personalization</category>
      <category>commandline</category>
      <category>terminal</category>
    </item>
    <item>
      <title>Covid-19 Updates via SMS for FREE</title>
      <dc:creator>Marouen Helali</dc:creator>
      <pubDate>Tue, 17 Mar 2020 23:44:41 +0000</pubDate>
      <link>https://forem.com/marwan01/covid-19-updates-via-sms-for-free-45i9</link>
      <guid>https://forem.com/marwan01/covid-19-updates-via-sms-for-free-45i9</guid>
      <description>&lt;p&gt;Hello everyone. We are a small group of young developers (looking to grow) who decided to come together and join forces in order to do our part to combat the unfathomable Coronavirus epidemic.&lt;/p&gt;

&lt;p&gt;Text the below number to get started:&lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s---FjxbApw--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/i/ezbpnnmsbm0vhd56dy3o.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s---FjxbApw--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/i/ezbpnnmsbm0vhd56dy3o.png" alt="Alt Text"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Checkout the project's open-source repository: &lt;a href="https://github.com/Marwan01/covid-helpline"&gt;https://github.com/Marwan01/covid-helpline&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;The purpose of this post is to humbly ask the dev community to give us a hand maintaining, scaling, and improving this project so it could keep running for FREE for those who need it the most. &lt;/p&gt;

&lt;p&gt;Learn more by visiting the detailed article my teammate wrote: &lt;a href="https://medium.com/@aandrei_38387/1-914-268-4399-open-source-covid-19-data-line-f5a566b51d99"&gt;https://medium.com/@aandrei_38387/1-914-268-4399-open-source-covid-19-data-line-f5a566b51d99&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Please reach out to me directly via &lt;a href="mailto:marwanest@live.fr"&gt;marwanest@live.fr&lt;/a&gt; to get added as a contributor. :) Thank you all for the attention.&lt;/p&gt;

</description>
      <category>coronavirus</category>
      <category>covid19</category>
      <category>opensource</category>
      <category>python</category>
    </item>
    <item>
      <title>Deploy an Angular App Using Google Cloud Run</title>
      <dc:creator>Marouen Helali</dc:creator>
      <pubDate>Tue, 25 Feb 2020 21:34:01 +0000</pubDate>
      <link>https://forem.com/marwan01/deploy-an-angular-app-using-google-cloud-run-3p4a</link>
      <guid>https://forem.com/marwan01/deploy-an-angular-app-using-google-cloud-run-3p4a</guid>
      <description>&lt;h4&gt;
  
  
  Learn how to create, Dockerize, and deploy your containerized Angular application using Google Cloud Run.
&lt;/h4&gt;

&lt;p&gt;TL;DR: working example &lt;a href="https://github.com/Marwan01/angular-cloudrun"&gt;Github repo&lt;/a&gt;.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Prerequisites:&lt;/strong&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;&lt;a href="https://nodejs.org/en/"&gt;Node&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://angular.io/cli"&gt;Angular CLI&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://www.docker.com/products"&gt;Docker&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://cloud.google.com/sdk/docs/quickstarts"&gt;Google Cloud SDK&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;An activated &lt;a href="https://console.cloud.google.com/"&gt;Google Cloud Platform&lt;/a&gt; account&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;em&gt;Skip step 1. if you already have a working Angular app.&lt;/em&gt;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;1. Create an Angular App&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;To get started, use the Angular CLI to generate a new Angular app:&lt;br&gt;
&lt;/p&gt;

&lt;p&gt;&lt;code&gt;ng new&lt;/code&gt;&lt;br&gt;
&lt;/p&gt;

&lt;p&gt;You will be prompted to name your app and add some configuration choices. &lt;/p&gt;

&lt;p&gt;Once the CLI has generated all the necessary files for your Angular app, you can test it out by executing these two commands.&lt;br&gt;
&lt;/p&gt;

&lt;p&gt;&lt;code&gt;cd &amp;lt;app-name&amp;gt;&lt;br&gt;
ng serve&lt;/code&gt;&lt;br&gt;
&lt;/p&gt;

&lt;p&gt;In your favorite browser, navigate to &lt;a href="http://localhost:4200"&gt;http://localhost:4200&lt;/a&gt;. With Angular 9, you will get a similar welcome screen to the one below.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--4aDGdWPC--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/i/m4104083pqgw2w6hqjm7.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--4aDGdWPC--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/i/m4104083pqgw2w6hqjm7.png" alt="Alt Text" width="880" height="444"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;2. Create a Google Cloud Project&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;Login to your GCP account, then &lt;a href="https://console.cloud.google.com/projectcreate"&gt;create a new project&lt;/a&gt;. You are not required to use an organization, as long as you have billing enabled on your account.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--B3TrRCkB--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/i/0ubtn3l77ysxhmpbyxvz.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--B3TrRCkB--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/i/0ubtn3l77ysxhmpbyxvz.png" alt="Alt Text" width="880" height="444"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--H6fgpXWK--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/i/h8k2farme021082f8ag8.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--H6fgpXWK--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/i/h8k2farme021082f8ag8.png" alt="Alt Text" width="880" height="445"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;After you see the GCP welcome dashboard for your freshly created project, click on the hamburger menu, and navigate to Cloud Run. Proceed by clicking the “start using Cloud Run” button. You should now see your Cloud Run dashboard. Click on the create service button.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--6ZE9pjhH--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/i/uvgpzdcq7bd7q7apc9m5.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--6ZE9pjhH--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/i/uvgpzdcq7bd7q7apc9m5.png" alt="Alt Text" width="880" height="445"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--c4-vM-E8--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/i/okoi66qcwy3w2xphjuu2.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--c4-vM-E8--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/i/okoi66qcwy3w2xphjuu2.png" alt="Alt Text" width="880" height="445"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;In service settings, enter a service name, and the container image URL should autofill. Select the region of your choice, then click create.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--1y3tU8Eb--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/i/4lvstavz7nwuw0cf6tej.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--1y3tU8Eb--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/i/4lvstavz7nwuw0cf6tej.png" alt="Alt Text" width="880" height="446"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Your new service is now created, and ready to have an image pushed to it.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;3. Dockerize, and Serve your Angular App Using ExpressJS&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;Cloud Run only works with containerized images. In order to containerize our Angular app, we use Docker. You can do so by creating a &lt;strong&gt;Dockerfile&lt;/strong&gt; in your project directory with the config below.&lt;br&gt;
&lt;/p&gt;

&lt;p&gt;&lt;code&gt;FROM node:12-slim&lt;br&gt;
WORKDIR /usr/src/app&lt;br&gt;
COPY package*.json ./&lt;br&gt;
RUN npm install -g @angular/cli&lt;br&gt;
RUN npm install&lt;br&gt;
COPY . ./&lt;br&gt;
RUN npm run build&lt;br&gt;
EXPOSE 8080&lt;br&gt;
CMD [ "node", "server.js" ]&lt;/code&gt;&lt;br&gt;
&lt;/p&gt;

&lt;p&gt;This &lt;strong&gt;Dockerfile&lt;/strong&gt; permits us to install the Angular CLI, along with all our project’s dependencies in a node-based docker container. It also builds and generates the necessary static files to serve our Angular app. Note that we expose port 8080, even though our Angular app’s default server port is 4200. Port 8080 is Google Cloud Run’s default port. This is a great transition to the last missing piece of the puzzle: Using ExpressJS.&lt;/p&gt;

&lt;p&gt;In order to get our app on the web, we need to serve the static files contained in our &lt;strong&gt;dist&lt;/strong&gt; folder using a service. ExpressJS is a NodeJS library that allows us to do so, in a few lines of code. Create a &lt;strong&gt;server.js&lt;/strong&gt; file and copy the below snippet to it, replacing &lt;em&gt;PROJECT-NAME&lt;/em&gt; with the name of your Angular app.&lt;br&gt;
&lt;/p&gt;

&lt;p&gt;&lt;code&gt;var express = require('express');&lt;br&gt;
var app = express();&lt;br&gt;
app.use(express.static('dist/PROJECT-NAME'));&lt;br&gt;
app.get('/', function (req, res,next) {&lt;br&gt;
    res.redirect('/');&lt;br&gt;
});&lt;br&gt;
app.listen(8080)&lt;/code&gt;&lt;br&gt;
&lt;/p&gt;

&lt;p&gt;After adding the two files, feel free to test your container by building an image and running it using the two commands below (replacing *app-tag *with the tag you wish to use).&lt;br&gt;
&lt;/p&gt;

&lt;p&gt;&lt;code&gt;docker build -t app-tag .&lt;br&gt;
docker run -p 8080:8080 app-tag&lt;/code&gt;&lt;br&gt;
&lt;/p&gt;

&lt;p&gt;Navigate to &lt;a href="http://localhost:8080"&gt;http://localhost:8080&lt;/a&gt; to see your Angular app served via ExpressJS from inside your container (hence the &lt;em&gt;“CMD [ “node”, “server.js” ]”&lt;/em&gt; at the bottom of your &lt;strong&gt;Dockerfile&lt;/strong&gt;).&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;4. Deploy your Angular App &lt;a href="https://cloud.google.com/run/docs/quickstarts/build-and-deploy"&gt;(Source)&lt;/a&gt;&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;All that is left to do, is to use the Google Cloud SDK to build and deploy your containerized web app.&lt;/p&gt;

&lt;p&gt;This is actually as simple as it sounds. Two commands, one to build, another to deploy. You will need your Project ID (Can be found in your &lt;br&gt;
&lt;a href="https://console.cloud.google.com/"&gt;Google project dashboard&lt;/a&gt;), and your Cloud Run service name. Execute the two below commands substituting PROJECT-ID and SERVICE-NAME with your values.&lt;br&gt;
&lt;/p&gt;

&lt;p&gt;&lt;code&gt;gcloud builds submit --tag gcr.io/PROJECT-ID/SERVICE-NAME&lt;br&gt;
gcloud run deploy --image gcr.io/PROJECT-ID/PROJECT-NAME --platform managed&lt;/code&gt;&lt;br&gt;
&lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--gvdzCThc--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/i/t1cz3uztij8qr7cbpkxh.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--gvdzCThc--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/i/t1cz3uztij8qr7cbpkxh.png" alt="Alt Text" width="880" height="65"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Once your revision (image) is deployed, you will get a link to your live Angular app. If you go back to your cloud console, you will see a green arrow next to your service in the Cloud Run dashboard. Scaling and provisioning will automatically be taken care of.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--Y1tMHu75--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/i/v8yfk06pje45xbva3x4z.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--Y1tMHu75--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/i/v8yfk06pje45xbva3x4z.png" alt="Alt Text" width="880" height="442"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Congratulations! You just deployed your container using Cloud Run! 🎉&lt;br&gt;
Here is the &lt;a href="https://angular-cloudrun-ty5llenj2q-uw.a.run.app/"&gt;demo link&lt;/a&gt; for the example used in this article along with the &lt;a href="https://github.com/Marwan01/angular-cloudrun"&gt;Github repo&lt;/a&gt;.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;5. Extras&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;Performance:&lt;/p&gt;

&lt;p&gt;You can make your deployment process faster, by adding a &lt;strong&gt;.dockerignore&lt;/strong&gt; file like the one below.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;Dockerfile
README.md
node_modules
npm-debug.log
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;This will tell the docker daemon not to copy those specific files to your new container. This will save some time, considering node_modules are particularly heavy.&lt;/p&gt;

&lt;p&gt;Cleanup &lt;a href="https://cloud.google.com/run/docs/quickstarts/build-and-deploy/"&gt;(Source)&lt;/a&gt;:&lt;/p&gt;

&lt;p&gt;&lt;em&gt;While Cloud Run does not charge when the service is not in use, you might still be &lt;a href="https://cloud.google.com/container-registry/pricing"&gt;charged for storing the container image in Container Registry&lt;/a&gt;. You can &lt;a href="https://cloud.google.com/container-registry/docs/managing#deleting_images"&gt;delete your image&lt;/a&gt; or delete your Cloud project to avoid incurring charges. Deleting your Cloud project stops billing for all the resources used within that project.&lt;/em&gt;&lt;/p&gt;

&lt;p&gt;Original Source: &lt;a href="https://medium.com/@marwan.helali01/deploying-an-angular-app-using-google-cloud-run-7a4d59048edd"&gt;https://medium.com/@marwan.helali01/deploying-an-angular-app-using-google-cloud-run-7a4d59048edd&lt;/a&gt;&lt;/p&gt;

</description>
      <category>angular</category>
      <category>sre</category>
      <category>devops</category>
      <category>tutorial</category>
    </item>
    <item>
      <title>Get Started With Vim</title>
      <dc:creator>Marouen Helali</dc:creator>
      <pubDate>Fri, 14 Feb 2020 21:33:04 +0000</pubDate>
      <link>https://forem.com/marwan01/get-started-with-vim-5a</link>
      <guid>https://forem.com/marwan01/get-started-with-vim-5a</guid>
      <description>&lt;p&gt;&lt;em&gt;You do not need to be a command line wizard to be able to use Vim. Using Vim consists in three simple steps: opening Vim, making the necessary text edits, then saving and exiting.&lt;/em&gt;&lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--A37A1Mnb--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_66%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/i/tplxsgxtig5jsv8y1wo9.gif" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--A37A1Mnb--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_66%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/i/tplxsgxtig5jsv8y1wo9.gif" alt="Alt Text" width="880" height="220"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h4&gt;
  
  
  &lt;strong&gt;1. Opening Vim&lt;/strong&gt;
&lt;/h4&gt;



&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;vim helloworld.txt
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Using the &lt;strong&gt;vim&lt;/strong&gt; command followed by a file name will result in opening that file in the vim editor. If that file does not already exist in your current directory, it will be created.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--8ccIwS_E--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/i/5vo9epuldckejdq3zrtz.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--8ccIwS_E--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/i/5vo9epuldckejdq3zrtz.png" alt="Alt Text" width="880" height="962"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h6&gt;
  
  
  Result of opening a new file using vim
&lt;/h6&gt;

&lt;p&gt;In this case, we see [New File], because I did not have a helloworld.txt already present in my directory, so I am creating it.&lt;/p&gt;

&lt;h4&gt;
  
  
  &lt;strong&gt;2. Using Vim&lt;/strong&gt;
&lt;/h4&gt;

&lt;p&gt;In order to go any further, we need to get a grasp on how Vim generally works. These are the key concepts you need to remember:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Vim is a text editor (just like VSCode) that runs in your terminal.&lt;/li&gt;
&lt;li&gt;Once you open Vim, you get into an interactive mode.&lt;/li&gt;
&lt;li&gt;IMPORTANT: Vim has multiple &lt;strong&gt;modes&lt;/strong&gt;.&lt;/li&gt;
&lt;li&gt;IMPORTANT: Vim operates on &lt;strong&gt;commands&lt;/strong&gt;.&lt;/li&gt;
&lt;li&gt;Vim is extremely configurable.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Theory behind &lt;strong&gt;modes &amp;amp; commands&lt;/strong&gt;:&lt;/p&gt;

&lt;p&gt;When you first open Vim, you are in &lt;strong&gt;NORMAL mode&lt;/strong&gt; (otherwise knows as &lt;strong&gt;MASTER mode&lt;/strong&gt;) . This is like your home base. You always want to make sure you are in &lt;strong&gt;NORMAL mode&lt;/strong&gt; before you execute any commands. Press &lt;em&gt;i&lt;/em&gt; to jump to &lt;strong&gt;INSERT mode&lt;/strong&gt;. Note that once you are in &lt;strong&gt;INSERT mode&lt;/strong&gt;, all your keystrokes will result in text. In other words, you will not be able to enter any &lt;strong&gt;commands&lt;/strong&gt;. In order to do so, you will need to go back to &lt;strong&gt;NORMAL mode&lt;/strong&gt;, which is easily achievable by pressing the &lt;em&gt;&amp;lt;ESC&amp;gt;&lt;/em&gt; key.&lt;/p&gt;

&lt;p&gt;Feel free to reference the diagram below. Keep in mind that &lt;strong&gt;VISUAL mode&lt;/strong&gt; is simply another mode, just like &lt;strong&gt;INSERT mode&lt;/strong&gt;, accessible by pressing &lt;em&gt;v&lt;/em&gt;.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--EiLrEpPT--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/i/fcuvhbtc80firb7ymdt8.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--EiLrEpPT--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/i/fcuvhbtc80firb7ymdt8.png" alt="Alt Text" width="880" height="310"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h6&gt;
  
  
  Source: &lt;a href="https://github.com/nilp0inter/Vim-for-Muggles"&gt;https://github.com/nilp0inter/Vim-for-Muggles&lt;/a&gt;
&lt;/h6&gt;

&lt;p&gt;Every Vim &lt;strong&gt;command&lt;/strong&gt; starts with a colon &lt;em&gt;:&lt;/em&gt; and is followed by a special keyword. Remember that you can only execute &lt;strong&gt;commands&lt;/strong&gt; in &lt;strong&gt;NORMAL mode&lt;/strong&gt;.&lt;/p&gt;

&lt;p&gt;Now that you understand the concept of &lt;strong&gt;modes &amp;amp; commands&lt;/strong&gt;, go back to your terminal, and add some text to your file while in &lt;strong&gt;INSERT mode&lt;/strong&gt;:&lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--mwijIdd0--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/i/72aes489t72900vv7lkl.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--mwijIdd0--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/i/72aes489t72900vv7lkl.png" alt="Alt Text" width="880" height="955"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h4&gt;
  
  
  &lt;strong&gt;3. Closing Vim&lt;/strong&gt;
&lt;/h4&gt;

&lt;p&gt;To wrap this up, let’s make sure to have stackoverflow’s &lt;a href="https://stackoverflow.com/questions/11828270/how-do-i-exit-the-vim-editor?__hstc=188987252.7c216cdde1990bc2a1dcff50996e0d5a.1579895905681.1579895905681.1579895905681.1&amp;amp;__hssc=188987252.1.1579895905681&amp;amp;__hsfp=1578993557"&gt;most popular question answered&lt;/a&gt;. Numerous people (including me) end up opening Vim by mistake, and not knowing how to exit it (in my case, it was after a git commit command without a -m message).&lt;/p&gt;

&lt;p&gt;With the knowledge you have now, this is simply a matter of executing the right command. make sure you are in the &lt;strong&gt;NORMAL mode&lt;/strong&gt; by pressing &lt;em&gt;&amp;lt;ESC&amp;gt;&lt;/em&gt; and use the adequate &lt;em&gt;:q&lt;/em&gt; command from the list below to quit Vim.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;:q - no changes were made
:q! - trash all changes
:wq - save the changes
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--cDiNauq---/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/i/x3sntgka6qosce87oyyq.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--cDiNauq---/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/i/x3sntgka6qosce87oyyq.png" alt="Alt Text" width="880" height="950"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h6&gt;
  
  
  Using the :wq command to write changes and quit Vim.
&lt;/h6&gt;

&lt;h4&gt;
  
  
  WORKFLOW RECAP:
&lt;/h4&gt;

&lt;ol&gt;
&lt;li&gt;Open file using Vim: &lt;em&gt;vim &lt;/em&gt;
&lt;/li&gt;
&lt;li&gt;INSERT mode: press &lt;em&gt;i&lt;/em&gt;
&lt;/li&gt;
&lt;li&gt;NORMAL mode: &lt;em&gt;&amp;lt;ESC&amp;gt;&lt;/em&gt;
&lt;/li&gt;
&lt;li&gt;Save Changes &amp;amp; Exit: &lt;em&gt;:wq&lt;/em&gt;
&lt;/li&gt;
&lt;li&gt;Exit Without Saving Changes: &lt;em&gt;:q!&lt;/em&gt;
&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;If you think you got a handle on the 5 steps from the recap above, then congratulations 🎊 you are now a Vim user!&lt;/p&gt;

&lt;h4&gt;
  
  
  NEXT STEPS:
&lt;/h4&gt;

&lt;p&gt;Although this article might help you get your feet wet with Vim by accomplishing basic text editing operations quickly via the terminal, it only encompasses about 1% of Vim’s potential. If you want to learn more, &lt;em&gt;vimtutor&lt;/em&gt; is a fantastic built-in command that will pull up important Vim lessons on your terminal. You can also access it on the web via vimtutor.&lt;/p&gt;

&lt;p&gt;Still trying to grow your Vim knowledge? Checkout these resources:&lt;/p&gt;

&lt;p&gt;🌐 Official Website: &lt;a href="https://www.vim.org/"&gt;https://www.vim.org/&lt;/a&gt;&lt;br&gt;
🎥 Youtube Playlist: &lt;a href="https://www.youtube.com/watch?v=_NUO4JEtkDw&amp;amp;list=PLMHNm2pfuJiuJUOSpIyGJHpk3B7PCvpBw"&gt;https://www.youtube.com/watch?v=_NUO4JEtkDw&amp;amp;list=PLMHNm2pfuJiuJUOSpIyGJHpk3B7PCvpBw&lt;/a&gt;&lt;br&gt;
🌐 Wikipedia: &lt;a href="https://en.wikipedia.org/wiki/Vim_(text_editor)"&gt;https://en.wikipedia.org/wiki/Vim_(text_editor)&lt;/a&gt;&lt;br&gt;
📜 My personal favorite Vim Cheat Sheet: &lt;a href="https://devhints.io/vim"&gt;https://devhints.io/vim&lt;/a&gt;&lt;br&gt;
🌐 Tutorial: &lt;a href="https://www.tutorialspoint.com/vim/vim_quick_guide.htm"&gt;https://www.tutorialspoint.com/vim/vim_quick_guide.htm&lt;/a&gt;&lt;br&gt;
🎨 Personalize Vim by editing .vimrc: &lt;a href="https://dougblack.io/words/a-good-vimrc.html"&gt;https://dougblack.io/words/a-good-vimrc.html&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Original Source: &lt;a href="https://medium.com/swlh/getting-started-with-vim-3f11fc4f62c4"&gt;https://medium.com/swlh/getting-started-with-vim-3f11fc4f62c4&lt;/a&gt;&lt;/p&gt;

</description>
      <category>vim</category>
      <category>shell</category>
      <category>commandline</category>
      <category>terminal</category>
    </item>
    <item>
      <title>Deploying a Static Bootstrap Website to Google Firebase</title>
      <dc:creator>Marouen Helali</dc:creator>
      <pubDate>Fri, 14 Feb 2020 20:25:56 +0000</pubDate>
      <link>https://forem.com/marwan01/deploying-a-static-bootstrap-website-to-google-firebase-l7a</link>
      <guid>https://forem.com/marwan01/deploying-a-static-bootstrap-website-to-google-firebase-l7a</guid>
      <description>&lt;h2&gt;
  
  
  What You’ll Need to Get Started
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;An activated &lt;a href="https://console.cloud.google.com/"&gt;Google Cloud Platform&lt;/a&gt; account&lt;/li&gt;
&lt;li&gt;&lt;a href="https://cloud.google.com/sdk/install"&gt;Google Cloud SDK&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;If you have previously worked on some HTML + CSS web pages, or anticipate to, you can only showcase your work to the world by uploading your project files to a hosting source where your websites become accessible through the internet. This has been a painful task in the last couple of decades. However, it has gotten much easier today. With all the cloud technologies getting more and more popular—and the pricing for the services getting cheaper and cheaper—you can basically host your website for free today with the help of some tools like Google Firebase Hosting.&lt;/p&gt;

&lt;p&gt;You are free to choose any static website to upload to Firebase Hosting. If you already have a project ready to be uploaded to the cloud, feel free to skip the first step below.&lt;/p&gt;

&lt;h4&gt;
  
  
  &lt;strong&gt;1. Creating a Bootstrap Website from a Template&lt;/strong&gt;
&lt;/h4&gt;

&lt;p&gt;For this tutorial, we will be using a Bootstrap template. To get started, let’s get a Bootstrap project from your favorite source of Bootstrap templates. I like to use &lt;a href="https://startbootstrap.com/templates/"&gt;Start Bootstrap&lt;/a&gt;. For my project, I will use an &lt;a href="https://startbootstrap.com/templates/scrolling-nav"&gt;easy template&lt;/a&gt; for simplicity. Once you have chosen yours, download it to a known folder then edit your &lt;strong&gt;index.html&lt;/strong&gt; to personalize your page. Finally, open your &lt;strong&gt;index.html&lt;/strong&gt; page in the browser to see your changes. Below is the template I downloaded before and after adding some changes.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--dZxeevvm--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/i/7vaafymtgatye6c39b3e.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--dZxeevvm--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/i/7vaafymtgatye6c39b3e.png" alt="Alt Text" width="880" height="226"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h4&gt;
  
  
  &lt;strong&gt;2. Creating a Firebase App&lt;/strong&gt;
&lt;/h4&gt;

&lt;p&gt;Navigate to the &lt;a href="https://console.firebase.google.com/"&gt;Firebase console&lt;/a&gt; and create a new project. Below is a series of screenshots representing every step of the process. You are free to enable/disable Google Analytics, but it is not a necessity.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--Wnq51dYO--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/i/tifs18sd7gln90v9k59t.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--Wnq51dYO--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/i/tifs18sd7gln90v9k59t.png" alt="Alt Text" width="880" height="444"&gt;&lt;/a&gt;&lt;br&gt;
&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--hT2utVw9--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/i/8cgxwds24we6ngx6z0t1.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--hT2utVw9--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/i/8cgxwds24we6ngx6z0t1.png" alt="Alt Text" width="880" height="445"&gt;&lt;/a&gt;&lt;br&gt;
&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--un4qNxa1--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/i/hxv5no3cetikrihmjtfs.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--un4qNxa1--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/i/hxv5no3cetikrihmjtfs.png" alt="Alt Text" width="880" height="445"&gt;&lt;/a&gt;&lt;br&gt;
&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--4HhRJADy--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/i/nf6xfk5jpltbxu5x8gnd.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--4HhRJADy--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/i/nf6xfk5jpltbxu5x8gnd.png" alt="Alt Text" width="880" height="446"&gt;&lt;/a&gt;&lt;br&gt;
&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--DnJN_mS0--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/i/jt6u7ysf6nik48jlhnpf.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--DnJN_mS0--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/i/jt6u7ysf6nik48jlhnpf.png" alt="Alt Text" width="880" height="445"&gt;&lt;/a&gt;&lt;br&gt;
&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--e3xO8GRd--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/i/6901qaosre2che789y8h.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--e3xO8GRd--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/i/6901qaosre2che789y8h.png" alt="Alt Text" width="880" height="444"&gt;&lt;/a&gt;&lt;br&gt;
&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--Q_NyOzZt--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/i/xs6wgvhufmgxk8xnji19.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--Q_NyOzZt--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/i/xs6wgvhufmgxk8xnji19.png" alt="Alt Text" width="880" height="444"&gt;&lt;/a&gt;&lt;br&gt;
&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--jxIlKXLg--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/i/ollp9bm4x555qup34y2m.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--jxIlKXLg--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/i/ollp9bm4x555qup34y2m.png" alt="Alt Text" width="880" height="445"&gt;&lt;/a&gt;&lt;br&gt;
&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--IWHugMVI--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/i/ux3y6k996w68bx2awl05.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--IWHugMVI--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/i/ux3y6k996w68bx2awl05.png" alt="Alt Text" width="880" height="445"&gt;&lt;/a&gt;&lt;/p&gt;
&lt;h4&gt;
  
  
  &lt;strong&gt;3. Preparing Project for Deployment&lt;/strong&gt;
&lt;/h4&gt;

&lt;p&gt;Before we can use the CLI to deploy our static website, we need to have a default public directory with our static files in it. So, in your project directory, move all your website files to a new folder named &lt;em&gt;public&lt;/em&gt;. Follow the screenshot below for help.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--yMxhR74P--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/i/syhv5dsdhbw93f1d9v0y.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--yMxhR74P--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/i/syhv5dsdhbw93f1d9v0y.png" alt="Alt Text" width="299" height="280"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;The last change we will need to make to our project before deploying it is to include the Firebase SDK. Upon creating your Firebase app, you will be shown a code snippet (see screenshot below). This is responsible for allowing your static website to interact with Firebase. Copy the code block and add it to the bottom of your &lt;strong&gt;index.html&lt;/strong&gt;.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--YQxMxTeT--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/i/ab0oj7sw4g1ixka1mze8.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--YQxMxTeT--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/i/ab0oj7sw4g1ixka1mze8.png" alt="Alt Text" width="880" height="444"&gt;&lt;/a&gt;&lt;/p&gt;
&lt;h4&gt;
  
  
  &lt;strong&gt;4. Using the Firebase CLI&lt;/strong&gt;
&lt;/h4&gt;

&lt;p&gt;If you do not have firebase installed, use this &lt;a href="https://firebase.google.com/docs/cli"&gt;link&lt;/a&gt; or this &lt;strong&gt;npm&lt;/strong&gt; command:&lt;br&gt;
npm install -g firebase-tools&lt;/p&gt;

&lt;p&gt;Now, using the terminal, make sure you are in your project’s directory and execute these three commands in order. Follow screenshots for detailed steps.&lt;br&gt;
&lt;/p&gt;

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

&lt;/div&gt;



&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--zwLSVb2y--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/i/cpo40k9bip2i6jjx0vcd.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--zwLSVb2y--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/i/cpo40k9bip2i6jjx0vcd.png" alt="Alt Text" width="609" height="328"&gt;&lt;/a&gt;&lt;br&gt;
&lt;/p&gt;

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

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

&lt;/div&gt;



&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--pp-BNz8y--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/i/2o4zktpsiz8c6alhb2p7.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--pp-BNz8y--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/i/2o4zktpsiz8c6alhb2p7.png" alt="Alt Text" width="610" height="376"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--lnZfFPNs--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/i/7k1hw45dzlhx7t7irbsw.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--lnZfFPNs--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/i/7k1hw45dzlhx7t7irbsw.png" alt="Alt Text" width="611" height="561"&gt;&lt;/a&gt;&lt;br&gt;
&lt;/p&gt;

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

&lt;/div&gt;



&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--TcxvCcHi--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/i/vt8himupwx848i7i0t8a.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--TcxvCcHi--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/i/vt8himupwx848i7i0t8a.png" alt="Alt Text" width="608" height="265"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Visit the hosting URL shown at the bottom of your terminal and you should see your deployed static website. Here is &lt;a href="https://bootstrap-firebase-96068.firebaseapp.com/"&gt;mine&lt;/a&gt;. You can also find some more information about your hosting in the &lt;a href="https://console.firebase.google.com/"&gt;Firebase console&lt;/a&gt;. You made it! 🎉&lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--VDq7AUky--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/i/kwg3ly1fuoxnc223dbjg.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--VDq7AUky--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/i/kwg3ly1fuoxnc223dbjg.png" alt="Alt Text" width="880" height="239"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;As an optional cleanup task, add &lt;strong&gt;.firebase&lt;/strong&gt;, &lt;strong&gt;.firebaserc&lt;/strong&gt;, and &lt;strong&gt;firebase.json&lt;/strong&gt; to your &lt;strong&gt;.gitignore&lt;/strong&gt;.&lt;/p&gt;

&lt;p&gt;Check out the &lt;a href="https://github.com/Marwan01/bootstrap-firebase"&gt;Github repo&lt;/a&gt; for the source code that was used for this article.&lt;/p&gt;

&lt;p&gt;Original Source: &lt;a href="https://medium.com/better-programming/deploying-a-static-bootstrap-website-to-google-firebase-a2eb043ff015"&gt;https://medium.com/better-programming/deploying-a-static-bootstrap-website-to-google-firebase-a2eb043ff015&lt;/a&gt;&lt;/p&gt;

</description>
      <category>html</category>
      <category>webdev</category>
      <category>google</category>
      <category>firebase</category>
    </item>
    <item>
      <title>Deploy a Vue.js App to Heroku</title>
      <dc:creator>Marouen Helali</dc:creator>
      <pubDate>Fri, 14 Feb 2020 17:53:07 +0000</pubDate>
      <link>https://forem.com/marwan01/deploy-a-vue-js-app-to-heroku-30m</link>
      <guid>https://forem.com/marwan01/deploy-a-vue-js-app-to-heroku-30m</guid>
      <description>&lt;p&gt;Prerequisites:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Git&lt;/li&gt;
&lt;li&gt;Node&lt;/li&gt;
&lt;li&gt;Vue CLI&lt;/li&gt;
&lt;li&gt;Heroku CLI&lt;/li&gt;
&lt;li&gt;Free Heroku Account&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;To get started, use the Vue CLI to generate a new Vue app:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;vue create &amp;lt;app-name&amp;gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;If prompted for preset by the CLI, choose default.&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%2Fi%2Fm86y1rzvewtodcjppamj.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%2Fi%2Fm86y1rzvewtodcjppamj.png" alt="Alt Text"&gt;&lt;/a&gt;&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;cd &amp;lt;app-name&amp;gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Now that you are in your new project directory, let’s try to run this app to make sure everything is working as expected. But first, I like to run my web apps uniformly using &lt;strong&gt;npm start&lt;/strong&gt;, and so does Heroku. Sadly, when initializing a Vue app, the start command is different &lt;strong&gt;(npm run serve)&lt;/strong&gt;. Let’s quickly change that. In your project folder, open the &lt;strong&gt;package.json&lt;/strong&gt; file.&lt;/p&gt;

&lt;p&gt;The curly braces block contained in &lt;strong&gt;scripts indicates&lt;/strong&gt; the aliases for the commands to their right. Simply replace &lt;em&gt;serve&lt;/em&gt; by &lt;em&gt;start&lt;/em&gt;. You should end up with something like this:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;{
  "name": "vue-heroku",
  "version": "0.1.0",
  "private": true,
  "scripts": {
    "start": "vue-cli-service serve",
    "build": "vue-cli-service build",
    "lint": "vue-cli-service lint"
  },
.
.
.
}
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Let’s give it a shot by going back to the terminal and running:&lt;br&gt;
&lt;/p&gt;

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

&lt;/div&gt;



&lt;p&gt;Navigate to &lt;a href="http://localhost:8080" rel="noopener noreferrer"&gt;http://localhost:8080&lt;/a&gt; and you should see the Vue-generated app.&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%2Fi%2Fnnnpdiimm7gncwm6nmmf.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%2Fi%2Fnnnpdiimm7gncwm6nmmf.png" alt="Alt Text"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Next, our Vue app is a simple front-end-only app. We can either serve it through a server, or we can serve the build files statically. Let’s go with the second option, which is much less cumbersome.&lt;/p&gt;

&lt;p&gt;All that’s required to do is to add one file to our project and one buildpack to Heroku. Create a file called &lt;strong&gt;static.json&lt;/strong&gt; in the root of your project repo. Add this content to it &lt;a href="https://cli.vuejs.org/guide/deployment.html#heroku" rel="noopener noreferrer"&gt;(official source)&lt;/a&gt;:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;{
  "root": "dist",
  "clean_urls": true,
  "routes": {
    "/**": "index.html"
  }
}
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;At this point, we are done editing our project. We can go ahead and commit our changes to Git by doing:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;git add . &amp;amp;&amp;amp; git commit -m "Heroku config"
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Let’s create a production build:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;npm run build
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Finally, here comes Heroku. Assuming you have the Heroku CLI, run:&lt;br&gt;
heroku login&lt;/p&gt;

&lt;p&gt;Press any key, and this will pull up a browser window for you to login:&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%2Fi%2Fj8av1e2qyx7bi4jdo06r.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%2Fi%2Fj8av1e2qyx7bi4jdo06r.png" alt="Alt Text"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;We are ready to create a new Heroku app using the CLI. Run:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;heroku create
&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%2Fi%2Fral2o5qfayx9ebmtr8nq.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%2Fi%2Fral2o5qfayx9ebmtr8nq.png" alt="Alt Text"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;A very important step is to run these two commands:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;heroku buildpacks:add heroku/nodejs
heroku buildpacks:add https://github.com/heroku/heroku-buildpack-static
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;This will allow Heroku to serve our app as a static app.&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%2Fi%2Fcy4lsabvj2qbgr2whowf.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%2Fi%2Fcy4lsabvj2qbgr2whowf.png" alt="Alt Text"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Now we can finally execute the deploy command:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;git push heroku master
&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%2Fi%2Faeqpdqsby5q8ss9urxnk.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%2Fi%2Faeqpdqsby5q8ss9urxnk.png" alt="Alt Text"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Navigate to the remote URL and you should see your Vue app.&lt;/p&gt;

&lt;p&gt;Here is &lt;a href="https://obscure-badlands-17467.herokuapp.com/" rel="noopener noreferrer"&gt;mine&lt;/a&gt;. You will also find your deployed app in the Heroku dashboard, which contains a lot of useful information if you would like to explore more. Here is what my dashboard looks like for reference:&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%2Fi%2F3eovzvef4to67vvqsvbp.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%2Fi%2F3eovzvef4to67vvqsvbp.png" alt="Alt Text"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Here is a link to the &lt;a href="https://github.com/Marwan01/vue-heroku" rel="noopener noreferrer"&gt;Github repo&lt;/a&gt; that contains the Vue app that was used for this article, along with all the modifications.&lt;/p&gt;

&lt;p&gt;Thank you for visiting, and keep on reading!&lt;/p&gt;

&lt;p&gt;Original Source: &lt;a href="https://medium.com/better-programming/deploying-a-vue-js-app-to-heroku-d16f95c07a04" rel="noopener noreferrer"&gt;https://medium.com/better-programming/deploying-a-vue-js-app-to-heroku-d16f95c07a04&lt;/a&gt;&lt;/p&gt;

</description>
      <category>webdev</category>
      <category>javascript</category>
      <category>vue</category>
      <category>heroku</category>
    </item>
    <item>
      <title>Deploy a React App to Google Cloud Platform using App Engine</title>
      <dc:creator>Marouen Helali</dc:creator>
      <pubDate>Fri, 14 Feb 2020 17:38:56 +0000</pubDate>
      <link>https://forem.com/marwan01/deploy-a-react-app-to-google-cloud-platform-using-app-engine-5fok</link>
      <guid>https://forem.com/marwan01/deploy-a-react-app-to-google-cloud-platform-using-app-engine-5fok</guid>
      <description>&lt;p&gt;Prerequisites:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;&lt;a href="https://nodejs.org/en/" rel="noopener noreferrer"&gt;Node&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;An activated &lt;a href="https://console.cloud.google.com/" rel="noopener noreferrer"&gt;Google Cloud Platform account&lt;/a&gt;
&lt;/li&gt;
&lt;li&gt;&lt;a href="https://cloud.google.com/sdk/docs/quickstarts" rel="noopener noreferrer"&gt;gcloud CLI&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;To get started, use npx to generate a new React app using &lt;a href="https://reactjs.org/docs/create-a-new-react-app.html" rel="noopener noreferrer"&gt;create-react-app&lt;/a&gt;:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;npx create-react-app &amp;lt;app-name&amp;gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Once npx has generated all the necessary files for your React app, let’s make sure it runs fine by doing:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;cd &amp;lt;app-name&amp;gt;
npm start
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;In your favorite browser, navigate to &lt;a href="http://localhost:3000" rel="noopener noreferrer"&gt;http://localhost:3000&lt;/a&gt;&lt;br&gt;
You should see a screen similar to this one:&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%2Fi%2Fzspuwmd4k9bgchp6d2n8.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%2Fi%2Fzspuwmd4k9bgchp6d2n8.png" alt="Alt Text"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Now that your app is up and running, let’s create a production build out of it. To do so, simply run:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;npm run build
&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%2Fi%2F4c1ekkclgyqhw0ujvwix.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%2Fi%2F4c1ekkclgyqhw0ujvwix.png" alt="Alt Text"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;At this point, there is nothing left to do from a React perspective. The next step is to configure a new project in the App Engine. Then, all that is left to do is to use the Google Cloud SDK to deploy our freshly built React app to GCP.&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%2Fi%2Fuhhfbfvq4rxc6f1hca20.gif" 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%2Fi%2Fuhhfbfvq4rxc6f1hca20.gif" alt="Alt Text"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Here is a series of screenshots that will walk you through how to do the first part: configure a new project in the GCP App Engine.&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%2Fi%2Fq9ttyp6542v6dytl134g.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%2Fi%2Fq9ttyp6542v6dytl134g.png" alt="Alt Text"&gt;&lt;/a&gt;&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%2Fi%2Ffu7mf97nng8fndtslv9y.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%2Fi%2Ffu7mf97nng8fndtslv9y.png" alt="Alt Text"&gt;&lt;/a&gt;&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%2Fi%2Fbq8clpxsmi44vwtzdj3l.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%2Fi%2Fbq8clpxsmi44vwtzdj3l.png" alt="Alt Text"&gt;&lt;/a&gt;&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%2Fi%2Fch3nbdbd0orce9814ux6.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%2Fi%2Fch3nbdbd0orce9814ux6.png" alt="Alt Text"&gt;&lt;/a&gt;&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%2Fi%2F64qteaxuaezcp0mp5dkl.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%2Fi%2F64qteaxuaezcp0mp5dkl.png" alt="Alt Text"&gt;&lt;/a&gt;&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%2Fi%2Fwzx8adcl6l636ipod0xk.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%2Fi%2Fwzx8adcl6l636ipod0xk.png" alt="Alt Text"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;If you followed the steps successfully, you should be able to see your Google App Engine dashboard like the last picture above. That was the last thing we had to do with the App Engine web console. Now, our focus will be on using the gcloud CLI. Verify that you have it by executing:&lt;br&gt;
&lt;/p&gt;

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

&lt;/div&gt;



&lt;p&gt;If you are having trouble installing it, here is your &lt;a href="https://cloud.google.com/sdk/docs/quickstarts" rel="noopener noreferrer"&gt;official guide&lt;/a&gt;.&lt;br&gt;
Now navigate to your React app folder. We need to create a new app.yaml file in the root of our project folder that the gcloud CLI will use to deploy our app to the App Engine. After you create the file, add this content to it &lt;a href="https://cloud.google.com/appengine/docs/flexible/nodejs/configuring-your-app-with-app-yaml" rel="noopener noreferrer"&gt;(official source)&lt;/a&gt;:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;runtime: nodejs
env: flex
# This sample incurs costs to run on the App Engine flexible environment.
  # The settings below are to reduce costs during testing and are not appropriate
# for production use. For more information, see:
# https://cloud.google.com/appengine/docs/flexible/nodejs/configuring-your-app-with-app-yaml
manual_scaling:
  instances: 1
resources:
  cpu: 1
memory_gb: 0.5
disk_size_gb: 10
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Make sure to save the file, and now we are finally ready to use the CLI:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;gcloud init
&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%2Fi%2F0scafx10ym90b1emmr1e.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%2Fi%2F0scafx10ym90b1emmr1e.png" alt="Alt Text"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Follow the steps to add your account, region, and make sure to pick the project you just created.&lt;/p&gt;

&lt;p&gt;Once that has been initialized successfully, we can run the final and ultimate deploy command:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;gcloud app deploy
&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%2Fi%2Fdpi02wr8onxp5plvsxy5.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%2Fi%2Fdpi02wr8onxp5plvsxy5.png" alt="Alt Text"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;After a few minutes, you should see a link in “Deployed service [default] to”:&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%2Fi%2Foo2lmpjwbh2tgdpj9oaz.gif" 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%2Fi%2Foo2lmpjwbh2tgdpj9oaz.gif" alt="Alt Text"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Visit it in your browser to find your deployed React App. Here is mine.&lt;br&gt;
Congrats Champ! You did it! 🎉🎉🎉&lt;/p&gt;

&lt;p&gt;Here is a &lt;a href="https://github.com/Marwan01/react-appengine" rel="noopener noreferrer"&gt;link&lt;/a&gt; to the git repo that contains the React app and the YAML file that was used for this article. Thank you for reading! 💟📖&lt;/p&gt;

&lt;p&gt;Original Source: &lt;a href="https://medium.com/better-programming/deploy-a-react-app-to-google-cloud-platform-using-google-app-engine-3f74fbd537ec" rel="noopener noreferrer"&gt;https://medium.com/better-programming/deploy-a-react-app-to-google-cloud-platform-using-google-app-engine-3f74fbd537ec&lt;/a&gt;&lt;/p&gt;

</description>
      <category>react</category>
      <category>webdev</category>
      <category>devops</category>
      <category>tutorial</category>
    </item>
    <item>
      <title>Deploy an Angular Application to AWS S3</title>
      <dc:creator>Marouen Helali</dc:creator>
      <pubDate>Fri, 14 Feb 2020 15:31:42 +0000</pubDate>
      <link>https://forem.com/marwan01/deploy-an-angular-application-to-aws-s3-3fgj</link>
      <guid>https://forem.com/marwan01/deploy-an-angular-application-to-aws-s3-3fgj</guid>
      <description>&lt;p&gt;Prerequisites:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;&lt;a href="https://nodejs.org/en/"&gt;Node&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://angular.io/cli"&gt;Angular CLI&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://aws.amazon.com/premiumsupport/knowledge-center/create-and-activate-aws-account/"&gt;An activated AWS account&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;To get started, use the Angular CLI to generate a new Angular app:&lt;br&gt;
&lt;/p&gt;

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

&lt;/div&gt;



&lt;p&gt;You will be prompted for a name for your app, and some configuration choices. Once the CLI has generated all the necessary files for your Angular app, let’s make sure it runs fine by doing:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;cd &amp;lt;app-name&amp;gt;
ng serve
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;In your favorite browser, navigate to &lt;a href="http://localhost:4200"&gt;http://localhost:4200&lt;/a&gt;. If you used Angular 8, you should see a similar screen to this:&lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--Nfgsif_7--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/i/zdpcqreyzacbkegn21ys.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--Nfgsif_7--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/i/zdpcqreyzacbkegn21ys.png" alt="Alt Text"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Now that your app is up and running, let’s deploy it to S3. To do so, you will need to log in to your AWS account and go to the &lt;a href="https://s3.console.aws.amazon.com/"&gt;S3 console&lt;/a&gt;.&lt;/p&gt;

&lt;p&gt;Click on the &lt;em&gt;Create Bucket&lt;/em&gt; button, and follow the steps to give your new bucket a name and choose an adequate region.&lt;/p&gt;

&lt;p&gt;Leave the &lt;em&gt;Configure options&lt;/em&gt; as is, and uncheck the Block all public access in the &lt;em&gt;Set permissions&lt;/em&gt; section. Now review and create your bucket. Your final screen should look like the image below:&lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--NbUq7zIK--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/i/048wjv87swcm8mjg6djq.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--NbUq7zIK--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/i/048wjv87swcm8mjg6djq.png" alt="Alt Text"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--skpgGnVS--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/i/i7evsegcq2molcblhuyc.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--skpgGnVS--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/i/i7evsegcq2molcblhuyc.png" alt="Alt Text"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Our new bucket looks great. But it will look even better when we fill it up.&lt;br&gt;
Currently, all we have is a folder with an Angular app. We need to generate the build files, so S3 can understand and serve them. Let’s go back to our Angular app and simply run:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;ng build --prod
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;You should see a new &lt;strong&gt;dist&lt;/strong&gt; folder in your project directory. It contains&lt;br&gt;
browser-understandable files that you now need to upload to your bucket.&lt;/p&gt;

&lt;p&gt;Go back to S3 to upload the content of your &lt;strong&gt;dist&lt;/strong&gt; folder. Make sure you choose the &lt;em&gt;Grant public read access to this object(s)&lt;/em&gt; in the &lt;em&gt;Manage public permissions&lt;/em&gt; dropdown.&lt;/p&gt;

&lt;p&gt;Leave the &lt;em&gt;Set permissions&lt;/em&gt; and Set properties as-is. Then click &lt;em&gt;Upload&lt;/em&gt;. Here are some helpful screenshots:&lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--Jt-5R-Xf--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/i/0oml1i5hlp844fdb57cz.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--Jt-5R-Xf--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/i/0oml1i5hlp844fdb57cz.png" alt="Alt Text"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--TCerCUqN--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/i/7xikhyzxxfd034xgswxq.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--TCerCUqN--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/i/7xikhyzxxfd034xgswxq.png" alt="Alt Text"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--TXHxKZbG--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/i/fyk0hg3akgwm7vyesj0z.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--TXHxKZbG--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/i/fyk0hg3akgwm7vyesj0z.png" alt="Alt Text"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Now, navigate to &lt;em&gt;Properties&lt;/em&gt; and expand &lt;em&gt;Static website hosting&lt;/em&gt;.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--R6Dl9AMb--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/i/bl0963p77ygt9kjjtgpr.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--R6Dl9AMb--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/i/bl0963p77ygt9kjjtgpr.png" alt="Alt Text"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Click &lt;em&gt;Use this bucket to host a website&lt;/em&gt; and enter &lt;strong&gt;index.html&lt;/strong&gt; for &lt;em&gt;Index document.&lt;/em&gt; Click &lt;em&gt;Save&lt;/em&gt;.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--ZqFBEZa7--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/i/r1vjxi4zsgzz7qqoyxyk.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--ZqFBEZa7--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/i/r1vjxi4zsgzz7qqoyxyk.png" alt="Alt Text"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;After saving it, you should see a colored checkmark for &lt;em&gt;Bucket hosting&lt;/em&gt; indicating that it is now enabled. At the top, &lt;em&gt;Endpoint&lt;/em&gt; is the link for your freshly deployed Angular app.&lt;/p&gt;

&lt;p&gt;After a minute or so, navigate to that link to see the result. Congrats! You just deployed your Angular app to AWS S3!&lt;/p&gt;

&lt;p&gt;Original Source: &lt;a href="https://medium.com/better-programming/deploying-an-angular-app-to-aws-s3-301e0c3827d7"&gt;https://medium.com/better-programming/deploying-an-angular-app-to-aws-s3-301e0c3827d7&lt;/a&gt;&lt;/p&gt;

</description>
      <category>aws</category>
      <category>angular</category>
      <category>javascript</category>
      <category>devops</category>
    </item>
    <item>
      <title>CI/CD with Travis CI and Google Firebase</title>
      <dc:creator>Marouen Helali</dc:creator>
      <pubDate>Wed, 12 Feb 2020 19:34:44 +0000</pubDate>
      <link>https://forem.com/marwan01/ci-cd-with-travis-ci-and-google-firebase-48fd</link>
      <guid>https://forem.com/marwan01/ci-cd-with-travis-ci-and-google-firebase-48fd</guid>
      <description>&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--X05rzfa7--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/i/jmdt6t7spd4ax5l148ir.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--X05rzfa7--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/i/jmdt6t7spd4ax5l148ir.png" alt="Alt Text" width="880" height="162"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h6&gt;
  
  
  Image Source: &lt;a href="https://cloud.google.com/solutions/continuous-delivery-with-travis-ci"&gt;https://cloud.google.com/solutions/continuous-delivery-with-travis-ci&lt;/a&gt;
&lt;/h6&gt;

&lt;p&gt;Hello everyone. It came to my attention how important automation is when I started working for a big corporation. I realized that if you do not automate all your scripts, you are most likely not going to do any testing at the end. Tech debt can become a real problem.&lt;/p&gt;

&lt;p&gt;Have you ever thought of having all your “post-Github-push” commands ( otherwise knows as deployment process) done for you automatically?&lt;/p&gt;

&lt;p&gt;Well today you will learn how to do so in 5 mins. And yes, all you will have to do, is push your new changes to your Github repo. Everything from there on will be taken care of.&lt;/p&gt;

&lt;p&gt;Prerequisites : Github account, Travis CI account, Firebase account.&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Find out what your process is after making changes to your repo:&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;In my case, after I push my changes to Github, I like to make sure it is passing all the linting, e2e tests, and unit tests. afterwards, I would like to build for production, and deploy to Firebase. Quite a few steps. As I said, automation.&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Sign up/ Login to your travis CI account using Github:
&lt;a href="https://travis-ci.org/"&gt;travis-ci.org&lt;/a&gt;
&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--OuMwvtFp--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/i/6vdngroem1rocziwoc2c.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--OuMwvtFp--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/i/6vdngroem1rocziwoc2c.png" alt="Alt Text" width="451" height="447"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h6&gt;
  
  
  Image Source: &lt;a href="https://travis-ci.com/images/logos/TravisCI-Mascot-1.png"&gt;https://travis-ci.com/images/logos/TravisCI-Mascot-1.png&lt;/a&gt;
&lt;/h6&gt;

&lt;ul&gt;
&lt;li&gt;Click the + button next to Repositories on the left. You should see your Github repos. Use the toggle to enable the repo you are trying to use Travis CI with. You should be able to see something similar to this:&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--6o5uUBAd--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/i/ty2rpjz8t4wxf3jafy0g.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--6o5uUBAd--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/i/ty2rpjz8t4wxf3jafy0g.png" alt="Alt Text" width="880" height="599"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Add a &lt;em&gt;.travis.yml&lt;/em&gt; file to the root folder of your project. Within this file, we are going to specify which server-side language we are using, and its version ; in our case, we are using nodejs 10. Next, we add our scripts from step 1. that we want to execute as soon as Travis CI receives a commit that you pushed to Github. Your &lt;em&gt;.travis.yml&lt;/em&gt; fire should look similar to this:
&lt;/li&gt;
&lt;/ul&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;language: node_js
node_js:
- '10'
script:
- ng lint
- ng e2e
- ng test
- ng build --prod
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Congratulations, you just ran your first automated CI build pipe.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--m2Oa6nod--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_66%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/i/qnx0ffumgji7d96t14az.gif" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--m2Oa6nod--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_66%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/i/qnx0ffumgji7d96t14az.gif" alt="Alt Text" width="432" height="288"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Additional Step: Automatic deployment to Firebase (Assuming you have already deployed your project to Firebase Hosting)&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;If you would like to also deploy to firebase after your tests and build succeed, you will need to execute this command in your project root:
&lt;/li&gt;
&lt;/ul&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;firebase login:ci
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;This will open up a browser tap and ask you for some permissions to sync up Github/Travis/Firebase together. At the end, you will see a nice token in the terminal. Save it, we are going to need it in the next step.&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Now we are almost there, we just have to do one last cool thing: Encrypting the token for Travis to understand. We need Ruby for that.
&lt;/li&gt;
&lt;/ul&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;install Ruby
gem install travis
travis encrypt "PASTE_YOUR_TOKEN_HERE"
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;ul&gt;
&lt;li&gt;You should have received an encrypted token that you can now add to the deploy part of your &lt;em&gt;.travis.yml&lt;/em&gt; to finally have your project automatically deployed to firebase each time you push changes successfully to Github!
&lt;/li&gt;
&lt;/ul&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;deploy:
 provider: firebase
 token:
  secure: "PASTE_TRAVIS_ENCODED_TOKEN_HERE"
message: "this is an automatic deployment by travis - CI as a result of pushing to master"
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Now make some changes, push to Github and watch your dreams come true on the Travis CI website. You should see something like this for a successful build:&lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--gXfpqrby--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/i/84gku55uchf7sd90rvdd.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--gXfpqrby--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/i/84gku55uchf7sd90rvdd.png" alt="Alt Text" width="880" height="108"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Now if you go to your Firebase hosted website, you should be able to see that your new changes took place. Enjoy!&lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--wKqZcaOG--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_66%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/i/o82w76yc80zo1ge1vdi8.gif" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--wKqZcaOG--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_66%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/i/o82w76yc80zo1ge1vdi8.gif" alt="Alt Text" width="412" height="302"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Original Source: &lt;a href="https://medium.com/faun/ci-cd-with-travis-ci-and-firebase-20b6c69fa8f7"&gt;https://medium.com/faun/ci-cd-with-travis-ci-and-firebase-20b6c69fa8f7&lt;/a&gt;&lt;/p&gt;

</description>
      <category>tutorial</category>
      <category>devops</category>
      <category>computerscience</category>
    </item>
    <item>
      <title>Intro to Quantum Computing with Qiskit and IBM Q</title>
      <dc:creator>Marouen Helali</dc:creator>
      <pubDate>Wed, 12 Feb 2020 17:22:08 +0000</pubDate>
      <link>https://forem.com/marwan01/intro-to-quantum-computing-with-qiskit-and-ibm-q-40cn</link>
      <guid>https://forem.com/marwan01/intro-to-quantum-computing-with-qiskit-and-ibm-q-40cn</guid>
      <description>&lt;p&gt;At the end of this tutorial, you will be able to simulate the behavior of quantum circuits on your computer using Qiskit. You will also be able to connect to the IBM Q backend and access IBM’s quantum computer through the cloud (believe it or not, it’s free and everyone can access it).&lt;/p&gt;

&lt;p&gt;Before we dive into real work, I want to lay down the requirements, and how to get them:&lt;/p&gt;

&lt;p&gt;You will need to have Python ( version &amp;gt; 3.5 ), Anaconda, and the Jupyter Console. You can install all of them at the same time, simply by getting the Anaconda distribution. You can find it &lt;a href="https://www.anaconda.com/distribution" rel="noopener noreferrer"&gt;here&lt;/a&gt;.&lt;/p&gt;

&lt;p&gt;Next, you will need to install the Qiskit library. In order to do that, you can use any package management system, but for the purpose of this tutorial I will demonstrate the steps of doing it using PIP. Now, you will need to get PIP which is a package management system for Python. Use this command to install PIP:&lt;br&gt;
&lt;/p&gt;

&lt;p&gt;&lt;code&gt;sudo apt install python-pip&lt;/code&gt;&lt;br&gt;
&lt;/p&gt;

&lt;p&gt;then use pip to install Qiskit using this command:&lt;br&gt;
&lt;/p&gt;

&lt;p&gt;&lt;code&gt;pip install qiskit&lt;/code&gt;&lt;br&gt;
&lt;/p&gt;

&lt;p&gt;You are almost there. Now all you need to do is to open up a terminal window. Then, type in:&lt;br&gt;
&lt;/p&gt;

&lt;p&gt;&lt;code&gt;jupyter console&lt;/code&gt;&lt;br&gt;
&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%2Fi%2F2uq6m2gw24xq9n3t3nku.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%2Fi%2F2uq6m2gw24xq9n3t3nku.png" alt="Alt Text"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h6&gt;
  
  
  You should have a similar screen to this.
&lt;/h6&gt;

&lt;p&gt;Congratulations, now you are ready to start executing commands and exploring the behavior of quantum circuits.&lt;br&gt;
I want to cover the theory behind the experiment that we will be doing, but first, it is good to know the difference between a Qubit and a regular bit. If you haven’t heard already, quantum computers use Qubits instead of classical bits to perform their tasks. Qubits are quantum-mechanical systems that can result in a 0 or a 1 or some superposition of them. Here is a good picture to show that:&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%2Fi%2Foabnlaebe4w2srtjm2fl.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%2Fi%2Foabnlaebe4w2srtjm2fl.png" alt="Alt Text"&gt;&lt;/a&gt;&lt;/p&gt;
&lt;h6&gt;
  
  
  Reference: &lt;a href="https://sureshemre.wordpress.com/2016/11/27/qubit/" rel="noopener noreferrer"&gt;https://sureshemre.wordpress.com/2016/11/27/qubit/&lt;/a&gt;
&lt;/h6&gt;

&lt;p&gt;In the last picture, you can see on the left the possible values of classical bits, versus on the right, the values a Qubit could take. These values can be represented by a percentage of the relative probability of finding the qubit in one state of the superposition or another. That probability could be given by the distance from the center of the position within a unit sphere. So basically, if it is closer to the bottom (relative to the picture), then it will be a 1, otherwise it will be a 0.&lt;/p&gt;

&lt;p&gt;To avoid confusion, I want to stress that quantum bits, just like classical bits, always result in either a 0 or a 1. They do not take on any other different values. But how they get there, is what is different from classical bits, and that is what makes it powerful.&lt;/p&gt;

&lt;p&gt;Back to the theory. So the big picture of what we will be doing in this tutorial is trying to cause an entangled state (also known as the Bell State). Buzzwords aside, look at the past sphere: the states along the axis running from 0 to 1 are essentially classical states. Now imagine two Qubits’ positions being right at equator of the circle of the sphere (equidistant from the poles). That is a 50 50 chance of being 0 or 1, and boom that’s an entangled state. In such a superposition state, each Qubit possesses correlations such that neither Qubit’s state can be fully described without referencing the state of the other Qubit. This is the simplest way to demonstrate the difference between a Quantum Computer and a classical one.&lt;/p&gt;

&lt;p&gt;Let’s dive right into coding after making sure you are working in your preferred directory. Let’s first start by creating a quantum circuit made out of a quantum register and a classical register. to do so, you will need to import qiskit, and define some variables. If you are familiar with Python, you will find ease at doing this, since under the hood, we are just coding in Python.&lt;br&gt;
&lt;/p&gt;

&lt;p&gt;&lt;code&gt;import qiskit as qk&lt;br&gt;
qr = qk.QuantumRegister(2)&lt;br&gt;
cr = qk.ClassicalRegister(2)&lt;br&gt;
qc = qk.QuantumCircuit(qr,cr)&lt;/code&gt;&lt;br&gt;
&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%2Fi%2Fv8p2lq646otaqn3gfied.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%2Fi%2Fv8p2lq646otaqn3gfied.png" alt="Alt Text"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;At this point, I want to introduce a mobile application called Hello Quantum. It is made by IBM and it looks very similar to a puzzle game. However, it explains how the quantum gates work and their behavior very well. I suggest playing with it for a little bit if you are interested in learning more about the circuit composition. The app’s icon looks like this:&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%2Fi%2Fy98wyk83o28qy5q1sybm.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%2Fi%2Fy98wyk83o28qy5q1sybm.png" alt="Alt Text"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Back to the code, now we can add operations to our circuit. We previously defined two registers (one quantum and one classical) and made a circuit out of them. Next, let’s apply a Hadamard gate on the quantum register and a cnot (controlled not) gate on the classical register.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;qc.h(qr[0])
qc.cx(qr[0],qr[1])
&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%2Fi%2Forl6aptcnw7foaktya5h.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%2Fi%2Forl6aptcnw7foaktya5h.png" alt="Alt Text"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Let’s add the measurements to the circuit we just created. Since we want to do the measurements with and without a Hadamard gate beforehand, it will be easier to create separate circuits for the measurements and combine them with our entangling circuit.&lt;/p&gt;

&lt;p&gt;The measure_Z circuit will just do our measurement in the standard basis. Afterwards, we use a qiskit function to store the result in the classical register&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;measure_Z = qk.QuantumCircuit(qr,cr)
measure_Z.measure(qr,cr)
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;We’ll call our second measure measure_X and we’ll apply a Hadamard gate to it before the measurement.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;measure_X = qk.QuantumCircuit(qr,cr)
measure_X.h(qr)
measure_X.measure(qr,cr)
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Now that we have defined our measurement circuits, we can append them to our entangling circuit, creating two new circuits that we will label test_Z and test_X.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;test_Z = qc + measure_Z
test_X = qc + measure_X
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;These are all the previous commands executed successfully to help make sure you nail them.&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%2Fi%2Fgpgylzkqyqx2b6a66vyr.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%2Fi%2Fgpgylzkqyqx2b6a66vyr.png" alt="Alt Text"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Now we get to the more exciting stuff! Real Quantum Computer connection!&lt;/p&gt;

&lt;p&gt;Navigate to &lt;a href="https://quantumexperience.ng.bluemix.net/qx" rel="noopener noreferrer"&gt;https://quantumexperience.ng.bluemix.net/qx&lt;/a&gt; and make an account and login. Once you are logged in, click on the avatar picture on the top right corner and go to account, then to advanced. You will be able to see a similar screen to this.&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%2Fi%2Foc7o0xt3m1nxuahwjeic.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%2Fi%2Foc7o0xt3m1nxuahwjeic.png" alt="Alt Text"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Copy your API Token, we will use it shortly.&lt;/p&gt;

&lt;p&gt;Next, import IBMQ and get ready to connect to a quantum computer!&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;from qiskit import execute, IBMQ
IBMQ.enable_account("Paste your APItoken here")
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Make sure you pass in your APItoken as a string. Now if you run IBMQ.backend() you should be able to see all the backends available to you by IBM. If you look closely, they are under IBM Q Backend Acces on your IBM Q account. Now let’s define a variable for our backend and start executing some code on the QC.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;backend = IBMQ.get_backend('ibmqx4')
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;I chose ibmqx4 for this example, but this is purely up to you what to use. Sometimes some backends go on maintenance, so I always check what backends are available before I choose one. Here is quick summary of the backend connecting.&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%2Fi%2Fbc4unw852b5rv33a2ppu.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%2Fi%2Fbc4unw852b5rv33a2ppu.png" alt="Alt Text"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Now remember the test jobs that we were preparing out of the circuits earlier? Now we are going to use them! let’s create a job this way:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;job= qk.execute([test_Z, test_X], backend = backend, shots = 1000)
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Next, let’s execute job.status() a few times, to monitor the status of the job. It should be queued if there are a lot of use for the quantum machines (or if you picked a busy one, a quick fix is to go back and redefine the variable for the backend with a different provider!), and after a bit, it should succeed. This is what I got from following that.&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%2Fi%2Fd9s7rhqszc5ozej9wp2f.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%2Fi%2Fd9s7rhqszc5ozej9wp2f.png" alt="Alt Text"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;At this point, the next step is to get the result for the execution of the job.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;result = job.result()
result.get_counts(test_Z)
result.get_counts(test_X)
from qiskit.tools.visualization import plot_histogram
plot_histogram(result.get_counts(test_Z))
&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%2Fi%2F45ja5amz6jk0e3qmgq7n.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%2Fi%2F45ja5amz6jk0e3qmgq7n.png" alt="Alt Text"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;those were the results from my execution. Yours may vary. The interpretation of that is that because of the execution on a quantum computer, we have shown the existence of the “Bell State”, which is when a Qubit is in the right middle between a 0 and 1 and, and only happens in a quantum system. That is given to us by the middle values on the x-axis (01 and 10), which represents the “Bell state”, otherwise known as the entangled state.&lt;/p&gt;

&lt;p&gt;Don’t believe me? See for yourself! let’s wrap this up by executing the same job on a local simulator (not quantum). These are the commands you will need to connect to Aer and use their local simulator, and re-execute the past job:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;from qiskit import Aer
backend = Aer.get_backend('qasm_simulator')
job = qk.execute([test_Z, test_X], backend= backend, shots=1000)
result = job.result()
plot_histogram(result.get_counts(test_Z))
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Here are the results:&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%2Fi%2Fwn41nqc0jq488kzv2o6j.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%2Fi%2Fwn41nqc0jq488kzv2o6j.png" alt="Alt Text"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;As you see from the graphs, there are no entangled state. All boring regular 0 and 1 bits. However, this was just your proof that you were using a quantum computer!&lt;br&gt;
Congratulations if you made it this far and were able to connect to the ibm Q backend and execute your first job!&lt;br&gt;
I want to thank Mr. McClure for being my biggest resource for this article. I utilized a lot of his Youtube video, I suggest you check it out!&lt;/p&gt;

&lt;p&gt;&lt;iframe width="710" height="399" src="https://www.youtube.com/embed/V3hXSftZuoc"&gt;
&lt;/iframe&gt;
&lt;/p&gt;

</description>
      <category>tutorial</category>
      <category>computerscience</category>
      <category>python</category>
    </item>
  </channel>
</rss>
