Skip to content
This repository was archived by the owner on Jun 11, 2022. It is now read-only.

Commit c8f0a45

Browse files
authored
📚 fix HTML anchors for GitHub w/ #user-content- prefix
1 parent e1cf291 commit c8f0a45

File tree

1 file changed

+38
-34
lines changed

1 file changed

+38
-34
lines changed

README.md

Lines changed: 38 additions & 34 deletions
Original file line numberDiff line numberDiff line change
@@ -3,30 +3,30 @@ Heroku Buildpack for create-react-app
33

44
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).
55

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)
24-
* [Compile-time config](#compile-time-configuration)
25-
* [Runtime config](#runtime-configuration)
26-
* [using an Add-on's config](#add-on-config-vars)
27-
* 🕵️ [Troubleshooting](#troubleshooting)
28-
* 📍 [Version compatibility](#version-compatibility)
29-
* 🏙 [Architecture](#architecture-)
6+
* 🚦 [Purpose](#user-content-purpose)
7+
* ⚠️ [Requirements](#user-content-requires)
8+
* 🚀 [Quick Start](#user-content-quick-start)
9+
* 🛠 [Usage](#user-content-usage)
10+
1. [Generate a React app](#user-content-generate-a-react-app)
11+
1. [Make it a git repo](#user-content-make-it-a-git-repo)
12+
1. [Create the Heroku app](#user-content-create-the-heroku-app)
13+
1. [Commit & deploy ♻️](#user-content-commit--deploy-️)
14+
1. [Continue Development](#user-content-continue-development)
15+
* 👓 [Customization](#user-content-customization)
16+
* [Web server](#user-content-web-server)
17+
* [Routing clean URLs](#user-content-routing-clean-urls)
18+
* [HTTPS-only](#user-content-https-only)
19+
* [Proxy](#user-content-proxy)
20+
* [Environment variables](#user-content-environment-variables)
21+
* [Set vars on Heroku](#user-content-set-vars-on-heroku)
22+
* [Set vars for local dev](#user-content-set-vars-for-local-dev)
23+
* [Compile-time vs Runtime](#user-content-compile-time-vs-runtime)
24+
* [Compile-time config](#user-content-compile-time-configuration)
25+
* [Runtime config](#user-content-runtime-configuration)
26+
* [using an Add-on's config](#user-content-add-on-config-vars)
27+
* 🕵️ [Troubleshooting](#user-content-troubleshooting)
28+
* 📍 [Version compatibility](#user-content-version-compatibility)
29+
* 🏙 [Architecture](#user-content-architecture-)
3030

3131
-----
3232

@@ -35,7 +35,11 @@ Purpose
3535

3636
**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.
3737

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).
3943

4044
Requires
4145
--------
@@ -51,7 +55,7 @@ Requires
5155
Quick Start
5256
-----------
5357

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.
5559

5660
✏️ *Replace `$APP_NAME` with a name for your unique app.*
5761

@@ -86,7 +90,7 @@ cd my-app
8690
git init
8791
```
8892

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).
9094

9195
### Create the Heroku app
9296

@@ -235,7 +239,7 @@ REACT_APP_CLIENT_ID=XyzxYzxyZ
235239

236240
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.
237241

238-
Requirement | [Compile-time](#compile-time-configuration) | [Runtime](#runtime-configuration)
242+
Requirement | [Compile-time](#user-content-compile-time-configuration) | [Runtime](#user-content-runtime-configuration)
239243
:--- |:---:|:---:
240244
never changes for a build | ✓ |
241245
support for [continuous delivery](https://www.heroku.com/continuous-delivery) | | ✓
@@ -244,7 +248,7 @@ different values for staging & production (in a [pipeline](https://devcenter.her
244248
ex: `REACT_APP_BUILD_VERSION` (static fact about the bundle) | ✓ |
245249
ex: `REACT_APP_DEBUG_ASSERTIONS` ([prune code from bundle](https://webpack.github.io/docs/list-of-plugins.html#defineplugin)) | ✓ |
246250
ex: `REACT_APP_API_URL` (transient, external reference) | | ✓
247-
ex: `REACT_APP_FILEPICKER_API_KEY` ([Add-on config vars](#add-on-config-vars)) | | ✓
251+
ex: `REACT_APP_FILEPICKER_API_KEY` ([Add-on config vars](#user-content-add-on-config-vars)) | | ✓
248252

249253
### Compile-time configuration
250254

@@ -301,7 +305,7 @@ Use a custom [`.profile.d` script](https://devcenter.heroku.com/articles/buildpa
301305
```bash
302306
export REACT_APP_ADDON_CONFIG=${ADDON_CONFIG:-}
303307
```
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
305309

306310
For example, to use the API key for the [Filestack](https://elements.heroku.com/addons/filepicker) JS image uploader:
307311

@@ -323,7 +327,7 @@ Troubleshooting
323327
Version compatibility
324328
---------------------
325329

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.
327331

328332
[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:
329333

@@ -345,8 +349,8 @@ This buildpack composes several buildpacks (specified in [`.buildpacks`](.buildp
345349
* complete Node.js enviroment to support the webpack build
346350
* `node_modules` cached between deployments
347351
2. [`mars/create-react-app-inner-buildpack`](https://github.com/mars/create-react-app-inner-buildpack)
348-
* enables [runtime environment variables](#runtime-configuration)
349-
* generates the [default `static.json`](#customization)
352+
* enables [runtime environment variables](#user-content-runtime-configuration)
353+
* generates the [default `static.json`](#user-content-customization)
350354
* performs the production build for create-react-app, `npm run build`
351355
3. [`heroku/static` buildpack](https://github.com/heroku/heroku-buildpack-static)
352356
* [Nginx](http://nginx.org/en/) web server
@@ -360,4 +364,4 @@ This buildpack composes several buildpacks (specified in [`.buildpacks`](.buildp
360364
This buildpack can deploy any SPA [single-page app] as long as it meets the following requirements:
361365

362366
* `npm run build` performs the transpile/bundling
363-
* the file `build/index.html` or [the root specified in `static.json`](#customization) exists at runtime.
367+
* the file `build/index.html` or [the root specified in `static.json`](#user-content-customization) exists at runtime.

0 commit comments

Comments
 (0)