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 Jun 11, 2022. It is now read-only.
Copy file name to clipboardExpand all lines: README.md
+38-34Lines changed: 38 additions & 34 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -3,30 +3,30 @@ Heroku Buildpack for create-react-app
3
3
4
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).
5
5
6
-
* 🚦 [Purpose](#purpose)
7
-
* ⚠️ [Requirements](#requires)
8
-
* 🚀 [Quick Start](#quick-start)
9
-
* 🛠 [Usage](#usage)
10
-
1.[Generate a React app](#generate-a-react-app)
11
-
1.[Make it a git repo](#make-it-a-git-repo)
12
-
1.[Create the Heroku app](#create-the-heroku-app)
13
-
1.[Commit & deploy ♻️](#commit--deploy-️)
14
-
1.[Continue Development](#continue-development)
15
-
* 👓 [Customization](#customization)
16
-
*[Web server](#web-server)
17
-
*[Routing clean URLs](#routing-clean-urls)
18
-
*[HTTPS-only](#https-only)
19
-
*[Proxy](#proxy)
20
-
*[Environment variables](#environment-variables)
21
-
*[Set vars on Heroku](#set-vars-on-heroku)
22
-
*[Set vars for local dev](#set-vars-for-local-dev)
23
-
*[Compile-time vs Runtime](#compile-time-vs-runtime)
**This buildpack deploys a React UI as a static web site.** The [Nginx](http://nginx.org/en/) web server provides optimum performance and security for the runtime.
37
37
38
-
If your goal is to combine React UI + API (Node, Ruby, Python…) into a *single app*, then this buildpack is not the answer. The simplest combined solution is to use [create-react-app + Node.js server](https://github.com/mars/heroku-cra-node). See also: [create-react-app + Rails 5 server](https://medium.com/superhighfives/a-top-shelf-web-stack-rails-5-api-activeadmin-create-react-app-de5481b7ec0b).
38
+
If your goal is to combine React UI + API (Node, Ruby, Python…) into a *single app*, then this buildpack is not the answer. The simplest combined solution is all javascript:
39
+
40
+
▶️ **[create-react-app + Node.js server](https://github.com/mars/heroku-cra-node)** on Heroku
41
+
42
+
Combination with other languages is possible too, like [create-react-app + Rails 5 server](https://medium.com/superhighfives/a-top-shelf-web-stack-rails-5-api-activeadmin-create-react-app-de5481b7ec0b).
39
43
40
44
Requires
41
45
--------
@@ -51,7 +55,7 @@ Requires
51
55
Quick Start
52
56
-----------
53
57
54
-
Ensure [requirements](#requires) are met, then execute the following in a terminal.
58
+
Ensure [requirements](#user-content-requires) are met, then execute the following in a terminal.
55
59
56
60
✏️ *Replace `$APP_NAME` with a name for your unique app.*
57
61
@@ -86,7 +90,7 @@ cd my-app
86
90
git init
87
91
```
88
92
89
-
At this point, this new repo is local, only on your computer. Eventually, you may want to [push to Github](#push-to-github).
93
+
At this point, this new repo is local, only on your computer. Eventually, you may want to [push to Github](#user-content-push-to-github).
90
94
91
95
### Create the Heroku app
92
96
@@ -235,7 +239,7 @@ REACT_APP_CLIENT_ID=XyzxYzxyZ
235
239
236
240
Two versions of variables are supported. In addition to compile-time variables applied during [build](https://github.com/facebookincubator/create-react-app#npm-run-build) the app supports variables set at runtime, applied as each web dyno starts-up.
@@ -301,7 +305,7 @@ Use a custom [`.profile.d` script](https://devcenter.heroku.com/articles/buildpa
301
305
```bash
302
306
export REACT_APP_ADDON_CONFIG=${ADDON_CONFIG:-}
303
307
```
304
-
1. set-up & use [Runtime configuration](#runtime-configuration) to access the variables
308
+
1. set-up & use [Runtime configuration](#user-content-runtime-configuration) to access the variables
305
309
306
310
For example, to use the API key for the [Filestack](https://elements.heroku.com/addons/filepicker) JS image uploader:
307
311
@@ -323,7 +327,7 @@ Troubleshooting
323
327
Version compatibility
324
328
---------------------
325
329
326
-
This buildpack will never intentionally cause previously deployed apps to become undeployable. Using master [as directed in the main instructions](#create-the-heroku-app) will always deploy an app with the most recent version of this buildpack.
330
+
This buildpack will never intentionally cause previously deployed apps to become undeployable. Using master [as directed in the main instructions](#user-content-create-the-heroku-app) will always deploy an app with the most recent version of this buildpack.
327
331
328
332
[Releases are tagged](https://github.com/mars/create-react-app-buildpack/releases), so you can lock an app to a specific version, if that kind of determinism pleases you:
329
333
@@ -345,8 +349,8 @@ This buildpack composes several buildpacks (specified in [`.buildpacks`](.buildp
345
349
* complete Node.js enviroment to support the webpack build
0 commit comments