Skip to content

Commit 6ed0c71

Browse files
marsgaearon
authored andcommitted
Add how to deploy to Heroku (#288)
1 parent 65c2ff3 commit 6ed0c71

File tree

1 file changed

+7
-1
lines changed

1 file changed

+7
-1
lines changed

template/README.md

+7-1
Original file line numberDiff line numberDiff line change
@@ -318,7 +318,9 @@ module.name_mapper='^\(.*\)\.\(jpg\|png\|gif\|eot\|svg\|ttf\|woff\|woff2\|mp4\|w
318318

319319
We will consider integrating more tightly with Flow in the future so that you don’t have to do this.
320320

321-
### Deploy to GitHub Pages
321+
### Deploy
322+
323+
#### GitHub Pages
322324

323325
>Note: this feature is available with `[email protected]` and higher.
324326
@@ -350,6 +352,10 @@ Note that GitHub Pages doesn't support routers that use the HTML5 `pushState` hi
350352
* You could switch from using HTML5 history API to routing with hashes. If you use React Router, you can switch to `hashHistory` for this effect, but the URL will be longer and more verbose (for example, `http://user.github.io/todomvc/#/todos/42?_k=yknaj`). [Read more](https://github.com/reactjs/react-router/blob/master/docs/guides/Histories.md#histories) about different history implementations in React Router.
351353
* Alternatively, you can use a trick to teach GitHub Pages to handle 404 by redirecting to your `index.html` page with a special redirect parameter. You would need to add a `404.html` file with the redirection code to the `build` folder before deploying your project, and you’ll need to add code handling the redirect parameter to `index.html`. You can find a detailed explanation of this technique [in this guide](https://github.com/rafrex/spa-github-pages).
352354

355+
#### Heroku
356+
357+
Use the [Heroku Buildpack for create-react-app](https://github.com/mars/create-react-app-buildpack).
358+
353359
### Something Missing?
354360

355361
If you have ideas for more “How To” recipes that should be on this page, [let us know](https://github.com/facebookincubator/create-react-app/issues) or [contribute some!](https://github.com/facebookincubator/create-react-app/edit/master/template/README.md)

0 commit comments

Comments
 (0)