Member-only story
Deploying a React App to Google Cloud Platform using App Engine
Create and deploy a React app to Google Cloud Platform from scratch in less than five minutes

Prerequisites:
- Node
- An activated Google Cloud Platform account
- gcloud CLI
To get started, use npx to generate a new React app using create-react-app:
npx create-react-app <app-name>
Once npx has generated all the necessary files for your React app, let’s make sure it runs fine by doing:
cd <app-name>
npm start
In your favorite browser, navigate to http://localhost:3000
You should see a screen similar to this one:

Now that your app is up and running, let’s create a production build out of it. To do so, simply run:
npm run build

At this point, there is nothing left to do from a React perspective. The next step is to configure a new project in the App Engine. Then, all that is left to do is to use the Google Cloud SDK to deploy our freshly built React app to GCP.

Here is a series of screenshots that will walk you through how to do the first part: configure a new project in the GCP App Engine.

