<?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: Joseph Odunsi</title>
    <description>The latest articles on DEV Community by Joseph Odunsi (@dhatguy).</description>
    <link>https://dev.to/dhatguy</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%2F168300%2F1dacacea-28d6-45d1-908d-d11271a12790.jpg</url>
      <title>DEV Community: Joseph Odunsi</title>
      <link>https://dev.to/dhatguy</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/dhatguy"/>
    <language>en</language>
    <item>
      <title>Deploy PERN Fullstack App on Heroku and Netlify(Automatic Deploy)</title>
      <dc:creator>Joseph Odunsi</dc:creator>
      <pubDate>Wed, 14 Jul 2021 17:55:47 +0000</pubDate>
      <link>https://dev.to/dhatguy/deploy-pern-fullstack-app-on-heroku-and-netlify-automatic-deploy-4e3e</link>
      <guid>https://dev.to/dhatguy/deploy-pern-fullstack-app-on-heroku-and-netlify-automatic-deploy-4e3e</guid>
      <description>&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%2Fcdn-images-1.medium.com%2Fmax%2F5356%2F0%2AePv-q6-x4IPpO4yL" 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%2Fcdn-images-1.medium.com%2Fmax%2F5356%2F0%2AePv-q6-x4IPpO4yL" alt="Photo by [Danielle MacInnes](https://unsplash.com/@dsmacinnes?utm_source=medium&amp;amp;utm_medium=referral) on [Unsplash](https://unsplash.com?utm_source=medium&amp;amp;utm_medium=referral)"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  Deploy PERN Fullstack App on Heroku and Netlify
&lt;/h2&gt;

&lt;p&gt;This article will walk you through how to deploy a PERN full-stack app with automatic deployment.&lt;/p&gt;

&lt;h2&gt;
  
  
  Prerequisites
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;&lt;p&gt;&lt;a href="https://www.heroku.com/" rel="noopener noreferrer"&gt;Heroku &lt;/a&gt;account&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;a href="https://devcenter.heroku.com/articles/heroku-cli" rel="noopener noreferrer"&gt;Heroku &lt;/a&gt;CLI&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;a href="https://www.netlify.com/" rel="noopener noreferrer"&gt;Netlify &lt;/a&gt;account&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;a href="https://www.postgresql.org/" rel="noopener noreferrer"&gt;PostgreSQL &lt;/a&gt;database&lt;/p&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  What is PERN?
&lt;/h2&gt;

&lt;p&gt;The PERN stack consists of &lt;strong&gt;P&lt;/strong&gt;ostgreSQL, &lt;strong&gt;E&lt;/strong&gt;xpress, &lt;strong&gt;R&lt;/strong&gt;eact, and &lt;strong&gt;N&lt;/strong&gt;ode. With the Express.js framework, PostgreSQL is used as a backend database. React.js serves as the frontend, and Node.js serves as the backend server.&lt;/p&gt;

&lt;h2&gt;
  
  
  Deployment Process
&lt;/h2&gt;

&lt;p&gt;Fork this &lt;a href="https://github.com/dhatGuy/yelp-clone-PERN" rel="noopener noreferrer"&gt;repository &lt;/a&gt;to get started.&lt;/p&gt;

&lt;p&gt;Take a look at the code provided. There are two folders:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;&lt;p&gt;client — which contains the front-end code built with React.js, and&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;server — which has the backend developed using Express.js&lt;/p&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Let’s make sure the app is running well locally.&lt;/p&gt;

&lt;p&gt;Change directory to the server and install the dependencies&lt;/p&gt;

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

npm install
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;

&lt;p&gt;Open a new terminal. Change directory to the client and install dependencies&lt;/p&gt;

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

npm install 
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;
&lt;h3&gt;
  
  
  Create database
&lt;/h3&gt;

&lt;p&gt;Since we are using PostgreSQL for the database. Make sure you have it &lt;a href="https://www.postgresql.org/download/" rel="noopener noreferrer"&gt;installed&lt;/a&gt;.&lt;/p&gt;

&lt;p&gt;Open your terminal and login into Postgres&lt;/p&gt;
&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;psql -U postgres
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;

&lt;p&gt;Enter &lt;code&gt;postgres&lt;/code&gt; as password.&lt;/p&gt;

&lt;p&gt;Create a database named yelp and connect to it.&lt;/p&gt;

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

\c yelp
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;

&lt;p&gt;We only need two tables for the app.&lt;/p&gt;

&lt;p&gt;Create &lt;code&gt;restaurants&lt;/code&gt; table&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;CREATE TABLE restaurants (

  id BIGSERIAL NOT NULL PRIMARY KEY,

  name VARCHAR(50) NOT NULL,

  location VARCHAR(50) NOT NULL,

  price_range INT NOT NULL check(

    price_range &amp;gt;= 1

    AND price_range &amp;lt;= 5

  )

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

&lt;/div&gt;

&lt;p&gt;Create the second table, &lt;code&gt;reviews&lt;/code&gt; &lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;CREATE TABLE reviews (

  id BIGSERIAL NOT NULL PRIMARY KEY,

  restaurant_id BIGINT REFERENCES restaurants(id) ON DELETE CASCADE,

  name VARCHAR(50) NOT NULL,

  review TEXT NOT NULL,

  rating INT NOT NULL check(

    rating &amp;gt;= 1

    AND rating &amp;lt;= 5

  )

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

&lt;/div&gt;

&lt;p&gt;Populate a row in the &lt;code&gt;restaurants&lt;/code&gt; table.&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;INSERT INTO restaurants(name, location, price_range)

VALUES ('Iya Toyosi Canteen', 'Sagamu', 3);
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;
&lt;h3&gt;
  
  
  Set environment variables
&lt;/h3&gt;

&lt;p&gt;Change directory into the &lt;code&gt;server&lt;/code&gt; folder and create a &lt;code&gt;.env&lt;/code&gt; file. Add the following contents.&lt;/p&gt;
&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;PG_USER=postgres

PG_PASSWORD=postgres

PG_HOST=localhost

PG_PORT=5432

PG_DATABASE=yelp

PORT=7000
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;
&lt;h3&gt;
  
  
  Start the app
&lt;/h3&gt;

&lt;p&gt;Open your terminal and navigate to the client folder. Start the client.&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;Open a new terminal and navigate to the server folder and start the server.&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;Open your browser and go to &lt;a href="http://localhost:3000" rel="noopener noreferrer"&gt;http://localhost:3000&lt;/a&gt; to see the app running like the screenshot below. You can play around with it.&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%2Fcdn-images-1.medium.com%2Fmax%2F3708%2F1%2A6ITDgp_7UedIio1fS0WdyA.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%2Fcdn-images-1.medium.com%2Fmax%2F3708%2F1%2A6ITDgp_7UedIio1fS0WdyA.png" alt="The app running"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  Server Deployment Process
&lt;/h2&gt;

&lt;p&gt;Let’s start with deploying the server on Heroku.&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;&lt;p&gt;Visit &lt;a href="https://heroku.com" rel="noopener noreferrer"&gt;Heroku&lt;/a&gt; and create an account if you don’t have one. &lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Install the &lt;a href="https://cli.heroku.com/" rel="noopener noreferrer"&gt;Heroku CLI&lt;/a&gt;. &lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Open your terminal and run the &lt;code&gt;heroku login&lt;/code&gt; command after installing the CLI. To complete your login, you will be prompted to enter any key to navigate your web browser. The CLI will then automatically log you in.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;Create a new Heroku app&lt;/p&gt;

&lt;p&gt;heroku create&lt;/p&gt;
&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;Heroku will generate a random name for your app or pass a parameter to specify your own app name.&lt;/p&gt;

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

&lt;/div&gt;

&lt;p&gt;The output&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%2Fcdn-images-1.medium.com%2Fmax%2F2000%2F1%2Aq3Li1-BPffVMXua3bqnRNQ.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%2Fcdn-images-1.medium.com%2Fmax%2F2000%2F1%2Aq3Li1-BPffVMXua3bqnRNQ.png" alt="Output"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;The app name is &lt;strong&gt;alluring-bryce-canyon-75245&lt;/strong&gt;, and the URL to view the app is &lt;strong&gt;&lt;a href="https://alluring-bryce-canyon-75245.herokuapp.com/" rel="noopener noreferrer"&gt;https://alluring-bryce-canyon-75245.herokuapp.com/&lt;/a&gt;.&lt;/strong&gt; Relax, it won’t work yet.&lt;/p&gt;

&lt;h3&gt;
  
  
  Setup Heroku Postgres Database
&lt;/h3&gt;

&lt;p&gt;To create a Postgres database, run this command in your terminal&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;heroku addons:create heroku-postgresql:hobby-dev --app your-app-name
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;

&lt;p&gt;This will create a database and sets a DATABASE_URL environment variable.&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%2Fcdn-images-1.medium.com%2Fmax%2F2000%2F1%2ATRozHh6sMpRhizpW9H_0ww.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%2Fcdn-images-1.medium.com%2Fmax%2F2000%2F1%2ATRozHh6sMpRhizpW9H_0ww.png" alt="Output after creating the database"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Run command &lt;code&gt;heroku addons&lt;/code&gt; to check the new addon you just created. You will see the Postgres database created with a name generated automatically, for example &lt;code&gt;postgresql-pointy-04867&lt;/code&gt;&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;nameless-journey-88760  postgresql-pointy-04867  heroku-postgresql:hobby-dev  free   created
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;

&lt;p&gt;To create the tables in the Postgres database, log into the Heroku database&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;heroku pg:psql database-name  --app your-app-name
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;

&lt;p&gt;Copy and paste the contents from &lt;code&gt;server/config/db.sql&lt;/code&gt; to create the two tables and insert a row.&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%2Fcdn-images-1.medium.com%2Fmax%2F2130%2F1%2ACCjuyh86Q7BLCyw1B4DFGA.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%2Fcdn-images-1.medium.com%2Fmax%2F2130%2F1%2ACCjuyh86Q7BLCyw1B4DFGA.png" alt="output after creating table"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;Don’t forget to replace the database name and app name with your own Heroku info.&lt;/p&gt;
&lt;/blockquote&gt;

&lt;h3&gt;
  
  
  Test the app locally.
&lt;/h3&gt;

&lt;p&gt;Run &lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;heroku local web
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;

&lt;p&gt;Running this will show you how it will run on Heroku. Open &lt;a href="http://localhost:7000/api/v1/restaurants" rel="noopener noreferrer"&gt;http://localhost:7000/api/v1/restaurants&lt;/a&gt; to see the app running locally.&lt;/p&gt;

&lt;h3&gt;
  
  
  Deploy the server
&lt;/h3&gt;

&lt;p&gt;Finally, it is time to deploy the server on Heroku.&lt;/p&gt;

&lt;p&gt;Open your terminal. From the root folder of the project, run this command&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;heroku git:remote -a alluring-bryce-canyon-75245
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;

&lt;p&gt;You can replace &lt;code&gt;alluring-bryce-canyon-75245&lt;/code&gt; with anything, preferable your Heroku app name. &lt;/p&gt;

&lt;p&gt;To push the code, specifically, the server folder, run &lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;git subtree push --prefix server heroku main
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;

&lt;p&gt;The server should be up and running now. Visit &lt;a href="https://alluring-bryce-canyon-75245.herokuapp.com/api/v1/restaurants" rel="noopener noreferrer"&gt;https://your-heroku-app-name/api/v1/restaurants&lt;/a&gt;&lt;/p&gt;

&lt;h3&gt;
  
  
  Automate server deployment from a subfolder
&lt;/h3&gt;

&lt;p&gt;Since our project has two folders, server and client, we can let Heroku know the path that leads to the server folder. We won’t have to run the above command every time we want to deploy the server.&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;&lt;p&gt;Go to the &lt;a href="https://dashboard.heroku.com/apps" rel="noopener noreferrer"&gt;Heroku dashboard&lt;/a&gt; and choose the app you are working on&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Click on the Settings tab. You will see the Config Vars section. Click on reveal vars.&lt;/p&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;a href="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fcdn-images-1.medium.com%2Fmax%2F3070%2F1%2AFDYDdrhIIu9fuN_tH8zX4A.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%2Fcdn-images-1.medium.com%2Fmax%2F3070%2F1%2AFDYDdrhIIu9fuN_tH8zX4A.png" alt="environment variables"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;&lt;p&gt;Set the input with placeholder KEY with &lt;code&gt;PROJECT_PATH&lt;/code&gt; and the input with placeholder VALUE with &lt;code&gt;server&lt;/code&gt; and click on Add. &lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Still on the Settings tab, you must add a Buildpack that instructs Heroku to locate your folder.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Under the Config Vars section, you will see the Buildpack section. Click on add Buildpack and enter &lt;a href="https://github.com/timanovsky/subdir-heroku-buildpack.git" rel="noopener noreferrer"&gt;https://github.com/timanovsky/subdir-heroku-buildpack.git&lt;/a&gt; as the URL. Save changes. &lt;/p&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Ensure it’s at the top of the Buildpack chain (drag the lines on the left to move it above any other Buildpacks you’ve added).&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%2Fcdn-images-1.medium.com%2Fmax%2F3398%2F1%2AlU9CkAFmppxDmIRrw_1JEg.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%2Fcdn-images-1.medium.com%2Fmax%2F3398%2F1%2AlU9CkAFmppxDmIRrw_1JEg.gif" alt="Heroku buildpacks"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Next, we will enable automatic deployment. To enable it, you must connect the GitHub repository of the project.&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;&lt;p&gt;Go to the deploy tab. From the deployment method, choose GitHub.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Search and connect the Github repo.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Finally, enable automatic deployment.&lt;/p&gt;&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;Anytime you run &lt;code&gt;git push&lt;/code&gt; , the server will deploy automatically. You don’t have to run the below command anymore.&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;git subtree push --prefix server heroku main
&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%2Fcdn-images-1.medium.com%2Fmax%2F3398%2F1%2A-AgOClMcwLnaTJDTXR5Bew.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%2Fcdn-images-1.medium.com%2Fmax%2F3398%2F1%2A-AgOClMcwLnaTJDTXR5Bew.gif" alt="enable automatic deployment"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  Client Deployment Process
&lt;/h2&gt;

&lt;p&gt;Before deploying, open the project folder and navigate to &lt;code&gt;client/src/apis&lt;/code&gt;. Open the &lt;code&gt;RestaurantFinder.js&lt;/code&gt; file.&lt;/p&gt;

&lt;p&gt;Replace “&lt;a href="https://alluringbrycecanyon75245.herokuapp.com/api/v1/restaurants" rel="noopener noreferrer"&gt;https://alluringbrycecanyon75245.herokuapp.com/api/v1/restaurants&lt;/a&gt;" with “&lt;a href="https://your-heroku-app-url/api/v1/restaurants" rel="noopener noreferrer"&gt;https://your-heroku-app-url/api/v1/restaurants&lt;/a&gt;"&lt;/p&gt;

&lt;p&gt;Commit the change and push. &lt;/p&gt;

&lt;h3&gt;
  
  
  Let’s get started
&lt;/h3&gt;

&lt;ul&gt;
&lt;li&gt;&lt;p&gt;Go to &lt;a href="https://netlify.com" rel="noopener noreferrer"&gt;Netlify &lt;/a&gt;and login into your account. Create if you don’t have one.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;After logging in, click on the button &lt;code&gt;new site from git&lt;/code&gt;&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Choose your git provider.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Choose the repository you want to deploy.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Under Basic Build Settings, fill the inputs as below.&lt;/p&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;a href="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fcdn-images-1.medium.com%2Fmax%2F2000%2F1%2AIIMrfpb8sb2rpKTqOv-_kQ.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%2Fcdn-images-1.medium.com%2Fmax%2F2000%2F1%2AIIMrfpb8sb2rpKTqOv-_kQ.png" alt="Netlify build settings"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;&lt;p&gt;Click on Deploy site.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;After deploying successfully, you will see a link to preview the app.&lt;/p&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Netlify also supports automatic deployment. By default, it is enabled. &lt;/p&gt;

&lt;p&gt;Anytime you run &lt;code&gt;git push&lt;/code&gt;, automatic deployment will start for both Heroku(server) and Netlify(client).&lt;/p&gt;

&lt;p&gt;That’s all! You’ve just deployed a full-stack PERN web app successfully.&lt;/p&gt;

&lt;h2&gt;
  
  
  References
&lt;/h2&gt;

&lt;p&gt;&lt;a href="https://stackoverflow.com/a/53221996/11885780" rel="noopener noreferrer"&gt;&lt;strong&gt;Automated heroku deploy from subfolder&lt;/strong&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;a href="https://dev.to/stlnick/how-to-deploy-a-full-stack-mern-app-with-heroku-netlify-ncb"&gt;How To Deploy a Full-Stack MERN App with Heroku/Netlify — DEV Community 👩‍💻👨‍💻&lt;/a&gt;&lt;/p&gt;

</description>
      <category>react</category>
      <category>postgres</category>
      <category>node</category>
      <category>express</category>
    </item>
    <item>
      <title>Santa hat removed from VS Code</title>
      <dc:creator>Joseph Odunsi</dc:creator>
      <pubDate>Fri, 20 Dec 2019 17:29:24 +0000</pubDate>
      <link>https://dev.to/dhatguy/santa-hat-removed-from-vs-code-35p7</link>
      <guid>https://dev.to/dhatguy/santa-hat-removed-from-vs-code-35p7</guid>
      <description>&lt;p&gt;A user was offended by the Santa hat on VSCode(&lt;a href="https://github.com/microsoft/vscode/issues/87268"&gt;Post here&lt;/a&gt;), which led to the removal of the Santa hat. &lt;br&gt;
What do you think? Is it fair or not?&lt;/p&gt;

</description>
      <category>discuss</category>
      <category>vscode</category>
    </item>
  </channel>
</rss>
