📚 multi-processing w/ Node Cluster API
This commit is contained in:
@@ -10,7 +10,7 @@ To deploy a frontend-only React app, use the static-site optimized
|
|||||||
|
|
||||||
## Design Points
|
## Design Points
|
||||||
|
|
||||||
A combo of two npm projects, the backend server and the frontend UI. 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 and thereforce two places to run `npm` commands:
|
||||||
|
|
||||||
1. [`package.json`](package.json) for [Node server](server/) & [Heroku deploy](https://devcenter.heroku.com/categories/deployment)
|
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
|
* `heroku-postbuild` script compiles the webpack bundle during deploy
|
||||||
@@ -18,6 +18,7 @@ A combo of two npm projects, the backend server and the frontend UI. So there ar
|
|||||||
2. [`react-ui/package.json`](react-ui/package.json) for [React web UI](react-ui/)
|
2. [`react-ui/package.json`](react-ui/package.json) for [React web UI](react-ui/)
|
||||||
* generated by [create-react-app](https://github.com/facebookincubator/create-react-app)
|
* generated by [create-react-app](https://github.com/facebookincubator/create-react-app)
|
||||||
|
|
||||||
|
Includes a minimal [Node Cluster](https://nodejs.org/docs/latest-v8.x/api/cluster.html) [implementation](server/index.js) to parallelize the single-threaded Node process across the available CPU cores.
|
||||||
|
|
||||||
## Demo
|
## Demo
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user