📚 clarify docs

This commit is contained in:
Mars Hall
2017-03-06 08:31:42 -08:00
committed by GitHub
parent f6b1849bff
commit e9f8b39a3a

View File

@@ -1,6 +1,6 @@
# create-react-app with a Node server on Heroku
A minimal example of using a Node backend (API, proxy, & routing) with a [React app](https://github.com/facebookincubator/create-react-app) and an [Express server](http://expressjs.com).
A minimal example of using a Node backend (server for API, proxy, & routing) with a [React frontend](https://github.com/facebookincubator/create-react-app).
To deploy a frontend-only React app, use the static-site optimized
▶️ [create-react-app-buildpack](https://github.com/mars/create-react-app-buildpack)
@@ -8,7 +8,7 @@ To deploy a frontend-only React app, use the static-site optimized
## Design Points
A combo of two npm projects, the backend and the frontend. So there are two `package.json` configs.
A combo of two npm projects, the backend server and the frontend UI. So there are two `package.json` configs.
1. [`package.json`](package.json) for [Node server](server/) & [Heroku deploy](https://devcenter.heroku.com/categories/deployment)
* `heroku-postbuild` script compiles the webpack bundle during deploy
@@ -17,11 +17,9 @@ A combo of two npm projects, the backend and the frontend. So there are two `pac
* generated by [create-react-app](https://github.com/facebookincubator/create-react-app)
## Punchline
## Demo
[Demo deployment](https://cra-node.herokuapp.com/).
Example API call is [fetched from relative URL](react-ui/src/App.js#L16).
[Demo deployment](https://cra-node.herokuapp.com/): example API call from the React UI is [fetched with a relative URL](react-ui/src/App.js#L16) that is served by an Express handler in the Node server.
## Deploy to Heroku