From 2396c92416371b545f98d20da106b07d4a8145db Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E8=A5=BF=E7=94=B0=20=E9=9B=85=E5=8D=9A?= Date: Wed, 5 Oct 2016 14:45:48 +0900 Subject: [PATCH 1/4] =?UTF-8?q?heroku=E3=81=A7=E3=83=87=E3=83=97=E3=83=AD?= =?UTF-8?q?=E3=82=A4=E3=81=A7=E3=81=8D=E3=82=8B=E3=82=88=E3=81=86=E3=81=AB?= =?UTF-8?q?devDependencies=E3=81=8B=E3=82=89dependencies=E3=81=AB=E7=A7=BB?= =?UTF-8?q?=E5=8B=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- package.json | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/package.json b/package.json index 9bc6075..2bb81f0 100644 --- a/package.json +++ b/package.json @@ -2,14 +2,12 @@ "name": "cra-sample", "version": "0.1.0", "private": true, - "devDependencies": { - "npm-run-all": "^3.1.0", - "react-scripts": "0.6.1" - }, "dependencies": { "express": "^4.14.0", "react": "^15.3.2", - "react-dom": "^15.3.2" + "react-dom": "^15.3.2", + "npm-run-all": "^3.1.0", + "react-scripts": "0.6.1" }, "scripts": { "start:dev": "react-scripts start", From a6359966304d78dafa8e60f92b313db6b29db821 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E8=A5=BF=E7=94=B0=20=E9=9B=85=E5=8D=9A?= Date: Wed, 5 Oct 2016 14:50:55 +0900 Subject: [PATCH 2/4] :innocent: update README.md --- README.md | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) diff --git a/README.md b/README.md index 7f9f755..15eb059 100644 --- a/README.md +++ b/README.md @@ -10,6 +10,22 @@ npm i npm run dev ``` +## herokuにデプロイする + +```sh +> heroku create (11s 634ms) +Creating app... done, ⬢ ancient-savannah-28074 +https://ancient-savannah-28074.herokuapp.com/ | https://git.heroku.com/ancient-savannah-28074.git +> heroku git:remote -a ancient-savannah-28074 (3s 317ms) +set git remote heroku to https://git.heroku.com/ancient-savannah-28074.git +> git push heroku master +... +remote: Verifying deploy.... done. +To https://git.heroku.com/ancient-savannah-28074.git + * [new branch] master -> master +> heroku open +``` + ## create-react-appからの変更点 - `/todos` にGETリクエストを出すReactアプリにした From 6fc8b20bdd1f10309016cc96c1ad2859ade4409a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E8=A5=BF=E7=94=B0=20=E9=9B=85=E5=8D=9A?= Date: Wed, 5 Oct 2016 14:58:38 +0900 Subject: [PATCH 3/4] add app.json --- app.json | 7 +++++++ 1 file changed, 7 insertions(+) create mode 100644 app.json diff --git a/app.json b/app.json new file mode 100644 index 0000000..8e1d4e5 --- /dev/null +++ b/app.json @@ -0,0 +1,7 @@ +{ + "name": "create-react-app sample", + "description": "A React.js application using create-react-app with express backend", + "repository": "https://github.com/adwd/create-react-app-sample", + "logo": "https://node-js-sample.herokuapp.com/node.png", + "keywords": ["node", "express", "react", "create-react-app"] +} \ No newline at end of file From fed81d0e6637865fab30e526778b6194a9a41042 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E8=A5=BF=E7=94=B0=20=E9=9B=85=E5=8D=9A?= Date: Wed, 5 Oct 2016 15:05:02 +0900 Subject: [PATCH 4/4] add heroku button --- README.md | 2 ++ 1 file changed, 2 insertions(+) diff --git a/README.md b/README.md index 15eb059..0164eef 100644 --- a/README.md +++ b/README.md @@ -1,5 +1,7 @@ # create-react-app-sample +[![Deploy](https://www.herokucdn.com/deploy/button.svg)](https://heroku.com/deploy) + [create-react-app](https://github.com/facebookincubator/create-react-app)をベースにした、herokuにデプロイできるReactアプリのサンプルです。
create-react-appが生成するReactアプリにバックエンドのREST APIとの通信を追加しています。