Build a MySQL Node.js CRUD App #4: Deploying to Heroku

Build a MySQL Node.js CRUD App #4: Deploying to Heroku

Hello and welcome to the finale of Let’s Build a MySQL Node.js CRUD App series! In the previous article, we have implemented our front-end…

Hello and welcome to the finale of  Let’s Build a MySQL Node.js CRUD App series! In the previous article, we have implemented our front-end with React and completed our full stack app.

If you haven’t read the previous article, please find it [here_](https://lo-victoria.com/build-a-mysql-nodejs-crud-app-3-the-client-side-with-react)._

Let’s wrap up this series by deploying our React MySQL app to Heroku. Heroku is a cloud platform (PaaS) that we can use to host our app for free.

Step 1: Install Heroku CLI

If you haven’t already, download and install Heroku CLI into your device. Click this  link and follow their download instructions.

Next, create Heroku account  here. Sign up for the free tier (or any) to get started.

Step 2: Package.json

Now let’s make the necessary changes to our app to prepare for Heroku deployment.

Go to our package.json file. Under the scripts property, change the default start script to:

"start": "node server.js",

Then add the Node version of the app as:

"engines": {
    "node": "12.14.1"
  },

Step 3: Procfile

In the root directory of the project, create a new file named Procfile and add this line in it:

web:node server.js

A Procfile specifies what commands the app must execute on startup. To learn more, read Heroku’s official documentation  here.

nodejs programming heroku

What is Geek Coin

What is GeekCash, Geek Token

Best Visual Studio Code Themes of 2021

Bootstrap 5 Tutorial - Bootstrap 5 Crash Course for Beginners

Nest.JS Tutorial for Beginners

Hello Vue 3: A First Look at Vue 3 and the Composition API

Hire NodeJs Developer

Looking to build dynamic, extensively featured, and full-fledged web applications? **[Hire NodeJs Developer](https://hourlydeveloper.io/hire-dedicated-node-js-developer/ "Hire NodeJs Developer")** to create a real-time, faster, and scalable...

Deploy NodeJS Application in Heroku with CI/CD for Free | Free Hosting for NodeJS

In this video, we will learn how to deploy a NodeJS application in Heroku from Github for free with CI/CD enabled.

NodeJS - Host your Nodejs (Chat Server) on Heroku Cloud || Free Tier || WhatsApp clone #24

NodeJs - Host your Nodejs (Chat Server) on Heroku Cloud || Free Tier || WhatsApp clone #24

How To Deploy Nodejs App To Heroku

In this tutorial, we will see How To Deploy Nodejs App To Heroku 2018. It is just a simple app. No fancy functionalities are there. I want to show you how you can deploy your Node.js application on Heroku. Heroku is a cloud platform as a service supporting several programming languages that are used as a web app.

Decoding Nodejs

The main goal of this blog is to explain the “Architecture of Nodejs” and to know how the Nodejs works behind the scenes. Generally, most of the server-side languages, like PHP, ASP.NET, Ruby, and including Nodejs follows multi-threaded architecture. That means for each client-side request initiates a new thread or even a new process.