LoginSignup
3
2

More than 5 years have passed since last update.

create-react-app を google cloud platformのapp engine(standard)で動かす。

Posted at

create-react-appをgoogle cloud platformのapp engineで動かそうとした時に戸惑ったので、その時のメモです。

普通にdeployすると node app.js が動いてしまって、create-react-appで作られたアプリが起動しない。

そこで下記を実行する。

npm run build

すると、buildフォルダが作られる。
スクリーンショット 2018-11-16 13.55.56.png

次に、yamlファイルで下記のように書いてやる。

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

- url: /
  static_dir: build

で、deployするとcreate-react-appで作られたアプリが起動してくれます。

3
2
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
3
2