📚 clarify docs
This commit is contained in:
10
README.md
10
README.md
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user