Majid
1 min readMay 17, 2018

--

Hi Dong, When you do gcloud app deploy it actually copies the whole application directory to cloud. So in order to serve your application in production, you need to build your react app first using npm run build and then push it to App Engine. Now that your application is build, you need to serve from the /build directory. You can do that by adding something like following in your app.yaml file. There are lots of other configuration options are available in app.yaml. You can read more about app.yaml here.

handlers:
- url: /
static_files: build/index.html
upload: build/index.html
- url: /
static_dir: build

--

--

Majid
Majid

Written by Majid

Lead Frontend Engineer at Almosafer.com. #javascript #angularjs #react #nodejs #dotNet majidkorai.com

Responses (3)