Skip to content

Commit 8659e55

Browse files
committed
Tweak howto
1 parent 2df4201 commit 8659e55

File tree

1 file changed

+10
-6
lines changed

1 file changed

+10
-6
lines changed

template/README.md

+10-6
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ You can find the most recent version of this guide [here](https://github.com/fac
99
- [npm start](#npm-start)
1010
- [npm run build](#npm-run-build)
1111
- [npm run eject](#npm-run-eject)
12-
- [How To](#how-to)
12+
- [Recipes](#recipes)
1313
- [Displaying Lint Output in the Editor](#displaying-lint-output-in-the-editor)
1414
- [Installing a Dependency](#installing-a-dependency)
1515
- [Importing a Component](#importing-a-component)
@@ -18,6 +18,7 @@ You can find the most recent version of this guide [here](https://github.com/fac
1818
- [Adding Images and Fonts](#adding-images-and-fonts)
1919
- [Adding Bootstrap](#adding-bootstrap)
2020
- [Adding Flow](#adding-flow)
21+
- [Integrating with a Node Backend](#integrating-with-a-node-backend)
2122
- [Deploying](#deploying)
2223
- [Something Missing?](#something-missing)
2324

@@ -88,7 +89,7 @@ Instead, it will copy all the configuration files and the transitive dependencie
8889

8990
You don’t have to ever use `eject`. The curated feature set is suitable for small and middle deployments, and you shouldn’t feel obligated to use this feature. However we understand that this tool wouldn’t be useful if you couldn’t customize it when you are ready for it.
9091

91-
## How To
92+
## Recipes
9293

9394
### Displaying Lint Output in the Editor
9495

@@ -128,7 +129,6 @@ npm install -g eslint babel-eslint eslint-plugin-react eslint-plugin-import esli
128129

129130
We recognize that this is suboptimal, but it is currently required due to the way we hide the ESLint dependency. The ESLint team is already [working on a solution to this](https://github.com/eslint/eslint/issues/3458) so this may become unnecessary in a couple of months.
130131

131-
132132
### Installing a Dependency
133133

134134
The generated project includes React and ReactDOM as dependencies. It also includes a set of scripts used by Create React App as a development dependency. You may install other dependencies (for example, React Router) with `npm`:
@@ -316,7 +316,7 @@ Now you are ready to use the imported React Bootstrap components within your com
316316

317317
Flow typing is currently [not supported out of the box](https://github.com/facebookincubator/create-react-app/issues/72) with the default `.flowconfig` generated by Flow. If you run it, you might get errors like this:
318318

319-
```
319+
```js
320320
node_modules/fbjs/lib/Deferred.js.flow:60
321321
60: Promise.prototype.done.apply(this._promise, arguments);
322322
^^^^ property `done`. Property not found in
@@ -342,7 +342,7 @@ src/index.js:5
342342
343343
To fix this, change your `.flowconfig` to look like this:
344344
345-
```
345+
```ini
346346
[libs]
347347
./node_modules/fbjs/flow/lib
348348

@@ -361,13 +361,17 @@ Re-run flow, and you shouldn’t get any extra issues.
361361
362362
If you later `eject`, you’ll need to replace `react-scripts` references with the `<PROJECT_ROOT>` placeholder, for example:
363363
364-
```
364+
```ini
365365
module.name_mapper='^\(.*\)\.css$' -> '<PROJECT_ROOT>/config/flow/css'
366366
module.name_mapper='^\(.*\)\.\(jpg\|png\|gif\|eot\|svg\|ttf\|woff\|woff2\|mp4\|webm\)$' -> '<PROJECT_ROOT>/config/flow/file'
367367
```
368368
369369
We will consider integrating more tightly with Flow in the future so that you don’t have to do this.
370370
371+
### Integrating with a Node Backend
372+
373+
Check out [this tutorial](https://www.fullstackreact.com/articles/using-create-react-app-with-a-server/) for instructions on integrating an app with a Node backend running on another port, and using `fetch()` to access it. You can find the companion GitHub repository [here](https://github.com/fullstackreact/food-lookup-demo).
374+
371375
### Deploying
372376
373377
#### GitHub Pages

0 commit comments

Comments
 (0)