This video is available to students only

Deploying an app to the world

Deploying your React apps is a vital step and this module will help you learn just how to do that. We cover some hosting history as well as your options for deployment in modern hosting ecosystems.

Deploying an app to the world#

Once your app is finished and ready, you’re going to want to deploy it to the world. In a large commercial organization, there will likely be multiple steps for this involving different environments, teams, and complex cloud hosting platforms, such as Amazon’s AWS or Microsoft's Azure.

These commercial environments can be both expensive to use and complex to set up and manage. In fact, it’s more than likely that if you end up working in a place using these environments, you’ll have entire teams dedicated to setting up hosting, running integration and deployment pipelines, and managing things from build through to deployment. They’re usually referred to as dev ops teams.

However, for single developers or small teams, static sites, or simple apps, you may just want to deploy your app to the world on your own hosting provider or deployment platform.

That’s what we’re going to do in this module. Taking our Furry Friends Gallery II, we’re going to build an optimized set of deployable code files and have them deployed to a public URL on the excellent Netlify cloud hosting platform.

First, it’s worth exploring some of the different terms, practices, and conventions that you’ll come across when exploring deploying your apps to the world.

Traditional hosting environments#

In the early days of the web, there were a limited number of ways to host a website. More often than not, it involved one or a handful of linked servers in a physical location serving requests from browsers.

For example, in the early days of Google’s founding (approx. 1997) its first search services were provided by a set of servers slotted into a rack physically based in their company office.

Things moved on considerably over the years but websites remained largely split into either simple, frontend sites consisting of HTML and CSS (maybe with a little JavaScript for basic interactivity) with CGI scripts to process payments or form submissions, to more complex backend sites involving PHP and server-side rendering.

A lot of hosting models were still based on physical hardware server space being sold with some redundancy built-in. They were relatively expensive, challenging to set up and maintain, and had a higher risk of failure.

Cloud-based hosting providers#

As new languages emerged to power a new breed of complex websites, hosting evolved into a more complex beast with a variety of options that we see today. Depending on your needs, you can opt for virtual servers/machines (AKA VMs), managed hosting environments, shared hosting spaces, containerized deployments (e.g. Kubernetes or Docker) scalable instances, and even serverless hosting for things like Lambdas or serverless functions.

Cloud-based hosting providers offer access to huge computing power that can start as small as you need and seamlessly scale up and down if you have an app that suddenly has an influx of active users.

Still based on physical servers, this computing hardware is housed in massive datacentres located across multiple sites across the globe. Code and apps and websites are rarely ever kept in one physical place, but rather replicated across slices of physical hardware across multiple datacentres using complex management software and techniques.

This offers several benefits:

  • Redundancy of your data — if any link in the chain suffers a fault, a duplicate/replicated link will take its place.

  • Zero management hassle — all the ins and outs of the complex hosting infrastructure are taken off your hands and the management of the environments is taken care of so you can focus on deploying more features.

  • Pay for what you need — depending on the host, you often only pay for what resources you use.

  • Instant scaling — app going viral? Not to worry, your hosting can instantly spin up more resources to handle the incoming spike in traffic.

Some of the larger players in this cloud-based hosting space include Amazon AWS, Microsoft Azure and Google Cloud. You can host just about anything you want on these providers.

The big three above offer a range of flexible, scalable hosting options and services within their platforms, but they can be overkill and work out fairly expensive if you’re trying to deploy a small website or simple app.


This page is a preview of Beginner's Guide to Real World React

No discussions yet