How to deploy a React SSR app on Google Cloud Platform

This is the sequel to  Intro to React Server Side Rendering, so check that out if you haven’t already.

Let’s deploy a basic React SSR app on Google Cloud Platform (GCP).

In this article, I’ll deploy a Web Application Server, upload webpack bundles to Cloud Storage, and serve those bundles via CDN. I’m using the italicized terms as defined in this excellent article,  Web Architecture 101 by

Jonathan Fulton

.Let’s accomplish this in two parts.

Part 1: Build and start the app locally.

Part 2: Deploy to the cloud.

Part 1: Build and start the app locally

Here’s the big picture:

  1. Transpile client-side and server-side bundles via webpack.
  2. Start a static server to serve the client-side bundles.
  3. Start the server-side bundle as the Web Application Server.

For reference, here’s the  Github repo for the code used in this section.

#nodejs #javascript #programming #react #node

Deploy React SSR to Production
1.50 GEEK