<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:dc="http://purl.org/dc/elements/1.1/">
  <channel>
    <title>DEV Community: Dirk Hoekstra</title>
    <description>The latest articles on DEV Community by Dirk Hoekstra (@dirk94).</description>
    <link>https://dev.to/dirk94</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%2F260473%2F6ff0c422-b205-46a5-ae11-cec3a46d64b9.png</url>
      <title>DEV Community: Dirk Hoekstra</title>
      <link>https://dev.to/dirk94</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/dirk94"/>
    <language>en</language>
    <item>
      <title>How to write a Web Scraper with Ruby</title>
      <dc:creator>Dirk Hoekstra</dc:creator>
      <pubDate>Sat, 16 Mar 2024 10:51:27 +0000</pubDate>
      <link>https://dev.to/dirk94/how-to-write-a-web-scraper-with-ruby-36aj</link>
      <guid>https://dev.to/dirk94/how-to-write-a-web-scraper-with-ruby-36aj</guid>
      <description>&lt;p&gt;&lt;a href="https://scraperbox.com/blog/web-scraping-with-ruby"&gt;https://scraperbox.com/blog/web-scraping-with-ruby&lt;/a&gt;&lt;/p&gt;

</description>
      <category>ruby</category>
      <category>webscraping</category>
    </item>
    <item>
      <title>How I spend $500 per day because of a misconfiguration</title>
      <dc:creator>Dirk Hoekstra</dc:creator>
      <pubDate>Fri, 05 Feb 2021 12:19:36 +0000</pubDate>
      <link>https://dev.to/dirk94/how-i-spend-500-per-day-because-of-a-misconfiguration-1jlk</link>
      <guid>https://dev.to/dirk94/how-i-spend-500-per-day-because-of-a-misconfiguration-1jlk</guid>
      <description>&lt;p&gt;In January I unknowingly spend $500 per day because of a misconfiguration. &lt;/p&gt;

&lt;p&gt;Read the full story here:&lt;br&gt;
&lt;a href="https://scraperbox.com/blog/spending-500-per-day-because-of-a-misconfiguration"&gt;https://scraperbox.com/blog/spending-500-per-day-because-of-a-misconfiguration&lt;/a&gt;&lt;/p&gt;

</description>
      <category>googlecloud</category>
      <category>startup</category>
      <category>cloud</category>
      <category>webdev</category>
    </item>
    <item>
      <title>Web Scraping with Ruby</title>
      <dc:creator>Dirk Hoekstra</dc:creator>
      <pubDate>Tue, 22 Dec 2020 13:15:03 +0000</pubDate>
      <link>https://dev.to/dirk94/web-scraping-with-ruby-370m</link>
      <guid>https://dev.to/dirk94/web-scraping-with-ruby-370m</guid>
      <description>&lt;p&gt;Hi guys 👋, &lt;/p&gt;

&lt;p&gt;I spend the last week writing a super in-depth Ruby web scraping guide.&lt;/p&gt;

&lt;p&gt;I show step-by-step how to build an indeed.com scraper using Ruby. &lt;/p&gt;

&lt;p&gt;&lt;a href="https://scraperbox.com/blog/web-scraping-with-ruby"&gt;You can find the article here&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Any feedback would be appreciated! :)&lt;/p&gt;

</description>
      <category>ruby</category>
      <category>webdev</category>
      <category>tutorial</category>
    </item>
    <item>
      <title>I couldn't find a house in Amsterdam, so I build a tool that helped me find a place to live in!</title>
      <dc:creator>Dirk Hoekstra</dc:creator>
      <pubDate>Thu, 19 Nov 2020 17:46:40 +0000</pubDate>
      <link>https://dev.to/dirk94/i-couldn-t-find-a-house-in-amsterdam-so-i-build-a-tool-that-helped-me-find-a-place-to-live-in-k38</link>
      <guid>https://dev.to/dirk94/i-couldn-t-find-a-house-in-amsterdam-so-i-build-a-tool-that-helped-me-find-a-place-to-live-in-k38</guid>
      <description>&lt;p&gt;Finding a rental in Amsterdam is really hard. There are way more people looking for a house than there are houses available.&lt;/p&gt;

&lt;p&gt;I would often react to a rental listing only to find out that I was too late (even though I reacted the same day it was posted!)&lt;/p&gt;

&lt;p&gt;So I started building some scrapers that would check all the rental listing websites every 5 minutes.  &lt;/p&gt;

&lt;p&gt;Each time a new listing came online the tool would send me an email! This helped me find a really nice place in Amsterdam and I thought "why not build a small SaaS tool out of it)&lt;/p&gt;

&lt;p&gt;Fast forward a few weeks and &lt;a href="https://woningalert.com/en"&gt;WoningAlert.com&lt;/a&gt; is live!&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media.dev.to/cdn-cgi/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fi%2Flhh0ukxz09d57qh3cfvh.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/cdn-cgi/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fi%2Flhh0ukxz09d57qh3cfvh.png" alt="Alt Text" width="800" height="475"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Let me know what you guys think! &lt;/p&gt;

</description>
      <category>saas</category>
      <category>node</category>
      <category>webdev</category>
      <category>vue</category>
    </item>
    <item>
      <title>I build a Web Scraping API, curious what you guys think!</title>
      <dc:creator>Dirk Hoekstra</dc:creator>
      <pubDate>Sun, 23 Aug 2020 15:44:00 +0000</pubDate>
      <link>https://dev.to/dirk94/i-build-a-web-scraping-api-curious-what-you-guys-think-48io</link>
      <guid>https://dev.to/dirk94/i-build-a-web-scraping-api-curious-what-you-guys-think-48io</guid>
      <description>&lt;p&gt;&lt;a href="https://media.dev.to/cdn-cgi/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fi%2Fta08qm2capg1yk0znqm4.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/cdn-cgi/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fi%2Fta08qm2capg1yk0znqm4.png" alt="Alt Text" width="800" height="417"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;I was playing around with Headless chrome browsers and proxy pools and decided it would be fun to turn it into a side project.&lt;/p&gt;

&lt;p&gt;A few months later and the &lt;a href="https://scraperbox.com"&gt;website is live&lt;/a&gt; :)&lt;/p&gt;

&lt;p&gt;Basically it is an API that handles headless Chrome browsers and proxy pools for you so you can easily scrape data from the web. &lt;/p&gt;

&lt;p&gt;I'm curious what you guys think of it!&lt;/p&gt;

</description>
      <category>saas</category>
      <category>webdev</category>
      <category>javascript</category>
      <category>showdev</category>
    </item>
    <item>
      <title>Cloud Run vs App Engine</title>
      <dc:creator>Dirk Hoekstra</dc:creator>
      <pubDate>Sun, 29 Dec 2019 09:56:49 +0000</pubDate>
      <link>https://dev.to/dirk94/cloud-run-vs-app-engine-nlb</link>
      <guid>https://dev.to/dirk94/cloud-run-vs-app-engine-nlb</guid>
      <description>&lt;h4&gt;
  
  
  Should you use Google’s Cloud Run or Google’s App Engine for your next project?
&lt;/h4&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--6RSFLZMh--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_800/https://miro.medium.com/max/3894/1%2AJmOLbF0JtZ-BucPeiGonSw.jpeg" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--6RSFLZMh--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_800/https://miro.medium.com/max/3894/1%2AJmOLbF0JtZ-BucPeiGonSw.jpeg" alt="clouds" width="800" height="535"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h1&gt;
  
  
  What is Cloud Run?
&lt;/h1&gt;

&lt;p&gt;In a nutshell, you give Google’s Cloud Run a Docker container containing a webserver. Google will run this container and create an HTTP endpoint.&lt;/p&gt;

&lt;p&gt;To deploy to the Google Cloud you should build a Docker container image on your local machine. Then, you should upload this container to Google Cloud.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;gcloud auth configure-docker
docker push grc.io/PROJECT-ID/IMAGE
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;And finally, you can deploy the pushed container with the following 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 run deploy --image gcr.io/PROJECT-ID/IMAGE

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

&lt;/div&gt;



&lt;p&gt;All the scaling is automatically done for you by Google. If there is a lot of traffic it will add more containers containing the webserver.&lt;/p&gt;

&lt;p&gt;Sounds great, but there’s a catch.&lt;/p&gt;

&lt;p&gt;Cloud Run depends on the fact that your application should be stateless. If you want to host a traditional web application this means that you should divide it up into a stateless API and a frontend app.&lt;/p&gt;

&lt;h1&gt;
  
  
  What is App Engine?
&lt;/h1&gt;

&lt;p&gt;With Google’s App Engine you tell Google how your app should be run. The App Engine will create and run a container from these instructions.&lt;/p&gt;

&lt;p&gt;For example, to host a Node project on Google’s App Engine, I can simply create the following &lt;code&gt;app.yml&lt;/code&gt; file.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;runtime: nodejs12
entrypoint: node build/server.js

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

&lt;/div&gt;



&lt;p&gt;To deploy it to the App Engine I can run the following 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;The App Engine will build a Docker Image with the &lt;code&gt;nodejs12&lt;/code&gt; environment and run the entrypoint command.&lt;/p&gt;

&lt;p&gt;All the scaling is automatically done for you. And as a bonus, you can even store state information on the server.&lt;/p&gt;

&lt;p&gt;This means that if you want to host an existing web application to the Google Cloud, the App Engine is probably your best bet.&lt;/p&gt;

&lt;h1&gt;
  
  
  Which service should you use?
&lt;/h1&gt;

&lt;p&gt;If you have an application that is not stateless then you should go for the App Engine.&lt;/p&gt;

&lt;p&gt;Also, deploying with App Engine is super easy. You simply fill out an &lt;code&gt;app.yml&lt;/code&gt; file and Google handles everything for you.&lt;/p&gt;

&lt;p&gt;However, with Cloud Run, you have more control. You can go crazy and build a ridiculous custom Docker image, no problem!&lt;/p&gt;

&lt;p&gt;In my opinion Cloud Run is made for devops engineers, App Engine is made for developers.&lt;/p&gt;

</description>
      <category>devops</category>
      <category>googlecloud</category>
      <category>webdev</category>
    </item>
    <item>
      <title>How I structure my Express + Typescript + React applications</title>
      <dc:creator>Dirk Hoekstra</dc:creator>
      <pubDate>Sat, 28 Dec 2019 14:13:13 +0000</pubDate>
      <link>https://dev.to/dirk94/how-i-structure-my-express-typescript-react-applications-g3e</link>
      <guid>https://dev.to/dirk94/how-i-structure-my-express-typescript-react-applications-g3e</guid>
      <description>&lt;p&gt;In this article, I will show you how I set up and structure my Express — React projects.&lt;/p&gt;

&lt;h1&gt;
  
  
  Folder structure
&lt;/h1&gt;

&lt;p&gt;When I set up a React Express app I always use the following folder structure.&lt;/p&gt;

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

├─app
├─build
├─frontend


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

&lt;/div&gt;

&lt;ul&gt;
&lt;li&gt;&lt;p&gt;The &lt;code&gt;app&lt;/code&gt; directory will hold the Express backend application.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;The &lt;code&gt;build&lt;/code&gt; directory will hold the production build of the frontend and backend application&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;The &lt;code&gt;frontend&lt;/code&gt; directory will hold the React frontend application.&lt;/p&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Note that you are free to use any other folder structure that you like, this is simply my preferred way of doing things.&lt;/p&gt;

&lt;h1&gt;
  
  
  Creating the React app
&lt;/h1&gt;

&lt;p&gt;Let’s begin with creating the React app. I’m going to use the &lt;code&gt;create-react-app&lt;/code&gt; npm package for this.&lt;/p&gt;

&lt;p&gt;You can run npm packages without installing them using the &lt;code&gt;npx&lt;/code&gt; tool.&lt;/p&gt;

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

npx create-react-app frontend


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

&lt;/div&gt;

&lt;p&gt;The react app will be created in the &lt;code&gt;frontend&lt;/code&gt; folder.&lt;/p&gt;

&lt;p&gt;Let’s test if the installation went correctly.&lt;/p&gt;

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

cd frontend
yarn run start


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

&lt;/div&gt;

&lt;p&gt;The &lt;code&gt;yarn run start&lt;/code&gt; command will run the React development server. Whenever you make changes to a file it will automatically recompile the react app and reload the browser! 🚀&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%2Fmiro.medium.com%2Fmax%2F4212%2F1%2A67rrUi3LOjmA-vP3m5k-eA.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%2Fmiro.medium.com%2Fmax%2F4212%2F1%2A67rrUi3LOjmA-vP3m5k-eA.png" alt="React app"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;The &lt;code&gt;create-react-app&lt;/code&gt; package will also initialize a git repository in the &lt;code&gt;frontend&lt;/code&gt; directory. However, I want to have a single git repository in the project root directory.&lt;/p&gt;

&lt;p&gt;To remove the git repository in the &lt;code&gt;frontend&lt;/code&gt; directory I simply remove the &lt;code&gt;.git&lt;/code&gt; directory.&lt;/p&gt;

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

rm -rf .git


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

&lt;/div&gt;
&lt;h1&gt;
  
  
  Creating the Express app
&lt;/h1&gt;

&lt;p&gt;We now have a working frontend application, now it’s time to set up the backend Typescript Express app.&lt;/p&gt;

&lt;p&gt;I start by creating a new package in the project root directory.&lt;/p&gt;

&lt;p&gt;Then I add the Express and Typescript dependencies and finally, I create the &lt;code&gt;app&lt;/code&gt; directory.&lt;/p&gt;
&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;

yarn init
yarn add express @types/express typescript
mkdir app



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

&lt;/div&gt;

&lt;p&gt;Next, I create a pretty standard &lt;code&gt;tsconfig.json&lt;/code&gt; file. This file contains the settings for compiling Typescript to Javascript.&lt;/p&gt;

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

&lt;/span&gt;&lt;span class="p"&gt;{&lt;/span&gt;&lt;span class="w"&gt;
  &lt;/span&gt;&lt;span class="nl"&gt;"compilerOptions"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="p"&gt;{&lt;/span&gt;&lt;span class="w"&gt;
    &lt;/span&gt;&lt;span class="nl"&gt;"module"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s2"&gt;"commonjs"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="w"&gt;
    &lt;/span&gt;&lt;span class="nl"&gt;"baseUrl"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s2"&gt;"./"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="w"&gt;
    &lt;/span&gt;&lt;span class="nl"&gt;"outDir"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s2"&gt;"build"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="w"&gt;
    &lt;/span&gt;&lt;span class="nl"&gt;"target"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s2"&gt;"es6"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="w"&gt;
    &lt;/span&gt;&lt;span class="nl"&gt;"moduleResolution"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s2"&gt;"node"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="w"&gt;
    &lt;/span&gt;&lt;span class="nl"&gt;"esModuleInterop"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="kc"&gt;true&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="w"&gt;
    &lt;/span&gt;&lt;span class="nl"&gt;"lib"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="s2"&gt;"es6"&lt;/span&gt;&lt;span class="p"&gt;],&lt;/span&gt;&lt;span class="w"&gt;
    &lt;/span&gt;&lt;span class="nl"&gt;"allowJs"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="kc"&gt;true&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="w"&gt;
    &lt;/span&gt;&lt;span class="nl"&gt;"forceConsistentCasingInFileNames"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="kc"&gt;true&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="w"&gt;
  &lt;/span&gt;&lt;span class="p"&gt;},&lt;/span&gt;&lt;span class="w"&gt;
  &lt;/span&gt;&lt;span class="nl"&gt;"include"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="w"&gt;
    &lt;/span&gt;&lt;span class="s2"&gt;"**.ts"&lt;/span&gt;&lt;span class="w"&gt;
  &lt;/span&gt;&lt;span class="p"&gt;],&lt;/span&gt;&lt;span class="w"&gt;
  &lt;/span&gt;&lt;span class="nl"&gt;"exclude"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="w"&gt;
    &lt;/span&gt;&lt;span class="s2"&gt;"./frontend"&lt;/span&gt;&lt;span class="w"&gt;
  &lt;/span&gt;&lt;span class="p"&gt;]&lt;/span&gt;&lt;span class="w"&gt;
&lt;/span&gt;&lt;span class="p"&gt;}&lt;/span&gt;&lt;span class="w"&gt;


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

&lt;/div&gt;

&lt;p&gt;I only want to use Typescript in the backend — at least for now. That is why I exclude the &lt;code&gt;frontend&lt;/code&gt; directory.&lt;/p&gt;

&lt;p&gt;In the app directory, I will create a &lt;code&gt;Server.ts&lt;/code&gt; that will contain a Server class.&lt;/p&gt;

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


&lt;span class="k"&gt;import&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;&lt;span class="nx"&gt;Express&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="nx"&gt;Request&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="nx"&gt;Response&lt;/span&gt;&lt;span class="p"&gt;}&lt;/span&gt; &lt;span class="k"&gt;from&lt;/span&gt; &lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;express&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;

&lt;span class="k"&gt;export&lt;/span&gt; &lt;span class="kd"&gt;class&lt;/span&gt; &lt;span class="nc"&gt;Server&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;

    &lt;span class="k"&gt;private&lt;/span&gt; &lt;span class="nx"&gt;app&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="nx"&gt;Express&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;

    &lt;span class="nf"&gt;constructor&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;app&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="nx"&gt;Express&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
        &lt;span class="k"&gt;this&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;app&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="nx"&gt;app&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;

        &lt;span class="k"&gt;this&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;app&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;get&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;/api&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;req&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="nx"&gt;Request&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="nx"&gt;res&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="nx"&gt;Response&lt;/span&gt;&lt;span class="p"&gt;):&lt;/span&gt; &lt;span class="k"&gt;void&lt;/span&gt; &lt;span class="o"&gt;=&amp;gt;&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
            &lt;span class="nx"&gt;res&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;send&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;You have reached the API!&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;
        &lt;span class="p"&gt;})&lt;/span&gt;
    &lt;span class="p"&gt;}&lt;/span&gt;

    &lt;span class="k"&gt;public&lt;/span&gt; &lt;span class="nf"&gt;start&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;port&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="kr"&gt;number&lt;/span&gt;&lt;span class="p"&gt;):&lt;/span&gt; &lt;span class="k"&gt;void&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
        &lt;span class="k"&gt;this&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;app&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;listen&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;port&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="p"&gt;()&lt;/span&gt; &lt;span class="o"&gt;=&amp;gt;&lt;/span&gt; &lt;span class="nx"&gt;console&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;log&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="s2"&gt;`Server listening on port &lt;/span&gt;&lt;span class="p"&gt;${&lt;/span&gt;&lt;span class="nx"&gt;port&lt;/span&gt;&lt;span class="p"&gt;}&lt;/span&gt;&lt;span class="s2"&gt;!`&lt;/span&gt;&lt;span class="p"&gt;));&lt;/span&gt;
    &lt;span class="p"&gt;}&lt;/span&gt;

&lt;span class="p"&gt;}&lt;/span&gt;


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

&lt;/div&gt;

&lt;p&gt;This class will receive the &lt;code&gt;Express&lt;/code&gt; app in the constructor and initialize the application routes.&lt;/p&gt;

&lt;p&gt;In the real world, I would probably create another class &lt;code&gt;Router.ts&lt;/code&gt; that will hold all the application routes, but that is out of scope for this article.&lt;/p&gt;

&lt;p&gt;To initialize this server I create a &lt;code&gt;index.ts&lt;/code&gt; file in the application root directory. All this does is create a new Server class and start the server.&lt;/p&gt;

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

&lt;span class="k"&gt;import&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;&lt;span class="nx"&gt;Server&lt;/span&gt;&lt;span class="p"&gt;}&lt;/span&gt; &lt;span class="k"&gt;from&lt;/span&gt; &lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;./app/Server&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
&lt;span class="k"&gt;import&lt;/span&gt; &lt;span class="nx"&gt;express&lt;/span&gt; &lt;span class="k"&gt;from&lt;/span&gt; &lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;express&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
&lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="nx"&gt;app&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="nf"&gt;express&lt;/span&gt;&lt;span class="p"&gt;();&lt;/span&gt;

&lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="nx"&gt;port&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="mi"&gt;8080&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;

&lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="nx"&gt;server&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="k"&gt;new&lt;/span&gt; &lt;span class="nc"&gt;Server&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;app&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;
&lt;span class="nx"&gt;server&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;start&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;port&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;


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

&lt;/div&gt;

&lt;p&gt;To start the backend server I add the following snippet to the &lt;code&gt;package.json&lt;/code&gt; file. It will use the &lt;code&gt;ts-node&lt;/code&gt; package to directly run Typescript code.&lt;/p&gt;

&lt;p&gt;This way you won't have to worry about compiling the Typescript to Javascript as it is all done for you.&lt;/p&gt;

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

&lt;/span&gt;&lt;span class="nl"&gt;"scripts"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="p"&gt;{&lt;/span&gt;&lt;span class="w"&gt;
    &lt;/span&gt;&lt;span class="nl"&gt;"start"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s2"&gt;"npx ts-node index.ts"&lt;/span&gt;&lt;span class="w"&gt;
&lt;/span&gt;&lt;span class="p"&gt;}&lt;/span&gt;&lt;span class="w"&gt;


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

&lt;/div&gt;

&lt;p&gt;That why I can start the server running the following command.&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%2Fmiro.medium.com%2Fmax%2F3808%2F1%2A0bhRx9Y5szqh_YDfPSDJFQ.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%2Fmiro.medium.com%2Fmax%2F3808%2F1%2A0bhRx9Y5szqh_YDfPSDJFQ.png" alt="API window"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;As a bonus, you can use &lt;a href="https://www.npmjs.com/package/nodemon" rel="noopener noreferrer"&gt;Nodemon&lt;/a&gt; to automatically restart ts-node when a file changes.&lt;/p&gt;

&lt;h1&gt;
  
  
  Building the React app
&lt;/h1&gt;

&lt;p&gt;Let’s make a production build of the React app.&lt;/p&gt;

&lt;p&gt;I will make a change to the &lt;code&gt;frontend/package.json&lt;/code&gt; file. Because after building the React application I want to move the build files to the &lt;code&gt;/build/frontend&lt;/code&gt; folder.&lt;/p&gt;

&lt;p&gt;Find the &lt;code&gt;"scripts"&lt;/code&gt; and update the &lt;code&gt;"build"&lt;/code&gt; line.&lt;/p&gt;

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

&lt;/span&gt;&lt;span class="nl"&gt;"scripts"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="p"&gt;{&lt;/span&gt;&lt;span class="w"&gt;
    &lt;/span&gt;&lt;span class="nl"&gt;"start"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s2"&gt;"react-scripts start"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="w"&gt;
    &lt;/span&gt;&lt;span class="nl"&gt;"build"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s2"&gt;"react-scripts build &amp;amp;&amp;amp; mv ./build ../build/frontend"&lt;/span&gt;&lt;span class="w"&gt;
  &lt;/span&gt;&lt;span class="p"&gt;}&lt;/span&gt;&lt;span class="err"&gt;,&lt;/span&gt;&lt;span class="w"&gt;


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

&lt;/div&gt;

&lt;p&gt;Let’s run the &lt;code&gt;yarn run build&lt;/code&gt; command and see if it works! 🙌&lt;/p&gt;

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

mkdir build 
cd frontend
yarn run build


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

&lt;/div&gt;

&lt;p&gt;If you navigate to the &lt;code&gt;/build/frontend&lt;/code&gt; directory you will see the production-ready React app!&lt;/p&gt;

&lt;h1&gt;
  
  
  Building the Express app
&lt;/h1&gt;

&lt;p&gt;Let’s add a new &lt;code&gt;"build"&lt;/code&gt; script to the &lt;code&gt;package.json&lt;/code&gt; file.&lt;/p&gt;

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

&lt;/span&gt;&lt;span class="nl"&gt;"scripts"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="p"&gt;{&lt;/span&gt;&lt;span class="w"&gt;
    &lt;/span&gt;&lt;span class="nl"&gt;"start"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s2"&gt;"npx ts-node index.ts"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="w"&gt;
    &lt;/span&gt;&lt;span class="nl"&gt;"build"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s2"&gt;"npx tsc"&lt;/span&gt;&lt;span class="w"&gt;
  &lt;/span&gt;&lt;span class="p"&gt;}&lt;/span&gt;&lt;span class="w"&gt;


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

&lt;/div&gt;

&lt;p&gt;This will simply call the Typescript compiler package &lt;code&gt;tsc&lt;/code&gt; to compile — or transpile if you prefer 💁‍♂— the Typescript to Javascript.&lt;/p&gt;

&lt;p&gt;Run the build command to test if it works!&lt;/p&gt;

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

yarn run build


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

&lt;/div&gt;

&lt;p&gt;If all went correctly your build directory should look like this.&lt;/p&gt;

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

build/
├─app/
├─frontend/
├─index.js


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

&lt;/div&gt;
&lt;h1&gt;
  
  
  Connecting Express and React
&lt;/h1&gt;

&lt;p&gt;We can develop the backend and frontend applications and build them. However, we should also connect Express to React.&lt;/p&gt;

&lt;p&gt;For example, if I browse to &lt;code&gt;localhost:8080/&lt;/code&gt; I should get to see the React application.&lt;/p&gt;

&lt;p&gt;If I browse to &lt;code&gt;localhost:8080/api&lt;/code&gt; I should get to see the API message.&lt;/p&gt;

&lt;p&gt;To do this I update the &lt;code&gt;constructor&lt;/code&gt; of the &lt;code&gt;Server&lt;/code&gt; class.&lt;/p&gt;
&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight typescript"&gt;&lt;code&gt;


&lt;span class="nf"&gt;constructor&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;app&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="nx"&gt;Express&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
    &lt;span class="k"&gt;this&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;app&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="nx"&gt;app&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;

    &lt;span class="k"&gt;this&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;app&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;use&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;express&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="k"&gt;static&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;path&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;resolve&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;./&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="o"&gt;+&lt;/span&gt; &lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;/build/frontend&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="p"&gt;));&lt;/span&gt;

    &lt;span class="k"&gt;this&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;app&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;get&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;/api&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;req&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="nx"&gt;Request&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="nx"&gt;res&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="nx"&gt;Response&lt;/span&gt;&lt;span class="p"&gt;):&lt;/span&gt; &lt;span class="k"&gt;void&lt;/span&gt; &lt;span class="o"&gt;=&amp;gt;&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
        &lt;span class="nx"&gt;res&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;send&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;You have reached the API!&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;
    &lt;span class="p"&gt;});&lt;/span&gt;

    &lt;span class="k"&gt;this&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;app&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;get&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;*&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;req&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="nx"&gt;Request&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="nx"&gt;res&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="nx"&gt;Response&lt;/span&gt;&lt;span class="p"&gt;):&lt;/span&gt; &lt;span class="k"&gt;void&lt;/span&gt; &lt;span class="o"&gt;=&amp;gt;&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
        &lt;span class="nx"&gt;res&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;sendFile&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;path&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;resolve&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;./&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="o"&gt;+&lt;/span&gt; &lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;/build/frontend/index.html&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;
    &lt;span class="p"&gt;});&lt;/span&gt;
&lt;span class="p"&gt;}&lt;/span&gt;


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

&lt;/div&gt;

&lt;p&gt;First I mark the &lt;code&gt;build/frontend&lt;/code&gt; directory as a static asset directory. This means that Express will automatically serve the files in that directory.&lt;/p&gt;

&lt;p&gt;Next, I add a wildcard &lt;code&gt;*&lt;/code&gt; route and send those all to the &lt;code&gt;index.html&lt;/code&gt; file. This is the file that holds the React frontend application.&lt;/p&gt;

&lt;p&gt;Let’s rerun the backend application.&lt;/p&gt;

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

yarn run start


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

&lt;/div&gt;

&lt;p&gt;When navigation to &lt;code&gt;localhost:8080&lt;/code&gt; I get to see the React application 🎉&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%2Fmiro.medium.com%2Fmax%2F3808%2F1%2AsWTeu711WQijR3Ocdcjzbg.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%2Fmiro.medium.com%2Fmax%2F3808%2F1%2AsWTeu711WQijR3Ocdcjzbg.png" alt="React app 2"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;When navigating to &lt;code&gt;localhost:8080/api&lt;/code&gt; I get to see the API message 🔥&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%2Fmiro.medium.com%2Fmax%2F3808%2F1%2A0bhRx9Y5szqh_YDfPSDJFQ.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%2Fmiro.medium.com%2Fmax%2F3808%2F1%2A0bhRx9Y5szqh_YDfPSDJFQ.png" alt="API message"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;That’s it! You can find the source code &lt;a href="https://github.com/Dirk94/express-react-app" rel="noopener noreferrer"&gt;here on Github&lt;/a&gt; 🚀&lt;/p&gt;

</description>
      <category>react</category>
      <category>webdev</category>
      <category>typescript</category>
      <category>node</category>
    </item>
    <item>
      <title>Pitfalls of Vue's reactivity</title>
      <dc:creator>Dirk Hoekstra</dc:creator>
      <pubDate>Fri, 01 Nov 2019 06:51:12 +0000</pubDate>
      <link>https://dev.to/dirk94/pitfalls-of-vue-s-reactivity-2lak</link>
      <guid>https://dev.to/dirk94/pitfalls-of-vue-s-reactivity-2lak</guid>
      <description>&lt;p&gt;My Vue views would sometimes refuse to automatically re-render. After slamming &lt;code&gt;Vue.$forceUpdate()&lt;/code&gt; everywhere in my codebase, I decided enough was enough and dove into Vue’s reactivity system.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://medium.com/better-programming/pitfalls-of-vues-reactivity-21a5f24ceb38?source=friends_link&amp;amp;sk=a4a86272d6d6772114c09755373d335e"&gt;View the post here&lt;/a&gt;&lt;/p&gt;

</description>
      <category>vue</category>
      <category>javascript</category>
      <category>webdev</category>
    </item>
    <item>
      <title>I build a Website Screenshot API, curious what you guys think!</title>
      <dc:creator>Dirk Hoekstra</dc:creator>
      <pubDate>Tue, 29 Oct 2019 10:32:28 +0000</pubDate>
      <link>https://dev.to/dirk94/i-build-a-website-screenshot-api-curious-what-you-guys-think-5h25</link>
      <guid>https://dev.to/dirk94/i-build-a-website-screenshot-api-curious-what-you-guys-think-5h25</guid>
      <description>&lt;p&gt;It started with me trying to figure out how to control a headless browser in Javascript. A few weeks later I had crafted a full &lt;a href="https://screenshotapi.net" rel="noopener noreferrer"&gt;SaaS application&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;I created a writeup on &lt;a href="https://medium.com/swlh/building-a-website-screenshot-api-3aeb3f21b465?source=friends_link&amp;amp;sk=b686e528cc63841de887de1ff33ea698" rel="noopener noreferrer"&gt;how I did it here&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%2Fthepracticaldev.s3.amazonaws.com%2Fi%2Fbdpbd2y2t9mxuep8fokh.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%2Fthepracticaldev.s3.amazonaws.com%2Fi%2Fbdpbd2y2t9mxuep8fokh.png" alt="ScreenshotAPI.net Homepage"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;I'm curious what you guys think about it, would love some feedback!&lt;/p&gt;

</description>
      <category>saas</category>
      <category>node</category>
      <category>webdev</category>
      <category>javascript</category>
    </item>
  </channel>
</rss>
