You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository was archived by the owner on Jan 13, 2025. It is now read-only.
Copy file name to clipboardExpand all lines: README.md
+20-11Lines changed: 20 additions & 11 deletions
Original file line number
Diff line number
Diff line change
@@ -1,7 +1,7 @@
1
1
Heroku Buildpack for create-react-app
2
2
=====================================
3
3
4
-
Deploy React.js web apps generated with [create-react-app](https://github.com/facebookincubator/create-react-app). Automates deployment with the built-in bundler and serves it up via [Nginx](http://nginx.org/en/). See the [introductory blog post](https://blog.heroku.com/deploying-react-with-zero-configuration) and entry in [Heroku elements](https://elements.heroku.com/buildpacks/mars/create-react-app-buildpack).
4
+
Deploy React.js web apps generated with [create-react-app](https://github.com/facebook/create-react-app). Automates deployment with the built-in bundler and serves it up via [Nginx](http://nginx.org/en/). See the [introductory blog post](https://blog.heroku.com/deploying-react-with-zero-configuration) and entry in [Heroku elements](https://elements.heroku.com/buildpacks/mars/create-react-app-buildpack).
✏️ *Replace `$APP_NAME` with the name for your unique app.*
87
+
88
88
```bash
89
-
create-react-app my-app
90
-
cdmy-app
89
+
npx create-react-app $APP_NAME
90
+
cd$APP_NAME
91
91
```
92
92
93
+
*[npx](https://medium.com/@maybekatz/introducing-npx-an-npm-package-runner-55f7d4bd282b) comes with npm 5.2+ and higher, see [instructions for older npm versions](https://gist.github.com/gaearon/4064d3c23a77c74a3614c498a8bb1c5f)
93
94
* If [yarn](https://yarnpkg.com) is installed locally, the new app will use it instead of [npm](https://www.npmjs.com).
94
95
95
96
### Make it a git repo
@@ -102,17 +103,17 @@ At this point, this new repo is local, only on your computer. Eventually, you ma
102
103
103
104
### Create the Heroku app
104
105
106
+
✏️ *Replace `$APP_NAME` with the name for your unique app.*
✏️ *Replace `$APP_NAME` with a name for your unique app.*
110
-
111
112
This command:
112
113
113
114
* sets the [app name](https://devcenter.heroku.com/articles/creating-apps#creating-a-named-app) & its URL `https://my-app-name.herokuapp.com`
114
-
* sets the [buildpack](https://devcenter.heroku.com/articles/buildpacks) to deploy a `create-react-app` app
115
-
* configures the [`heroku` remote](https://devcenter.heroku.com/articles/git#creating-a-heroku-remote) in the local git repo, so `git push heroku master` will push to this new Heroku app.
115
+
* sets the app to use this [buildpack](https://devcenter.heroku.com/articles/buildpacks)
116
+
* configures the [`heroku`git remote](https://devcenter.heroku.com/articles/git#creating-a-heroku-remote) in the local repo, so `git push heroku master` will push to this new Heroku app.
116
117
117
118
### Commit & deploy ♻️
118
119
@@ -122,6 +123,14 @@ git commit -m "Start with create-react-app"
122
123
git push heroku master
123
124
```
124
125
126
+
…or if you are ever working on a branch other than `master`:
127
+
128
+
✏️ *Replace `$BRANCH_NAME` with the name for the current branch.*
0 commit comments