This project serves as a boilerplate to start building an isomorphic rendering application in React, based on the following boilerplate code:
For more information, please visit my website 探索 React 服务器端加载 for details.
- Hot reloading middleware
- Redux DevTools and Logging
- Redux Routing
- Static content example
- Server-side webpack middleware
- React.js
- React-router
- Webpack
- Express
- Redux
- Redux-DevTools
- Babel
- New Relic
- If you wish to use
New Relic
for application performance management & monitoring, configure your ownapp_name
andlicense_key
insrc/server/newrelic.js
. Otherwise, please uncomment the linerequire('./newrelic')
insrc/server/index.js
. Note: Please usenpm install
instead of cnpm, otherwise new-relic module will get into an infinite loop. - If you wish to use
Forever
module for ensuring that a given script runs continuously, please set your own path info in JSON configuration fileforever.json
, then start the process with forever.
In the project's directory, run the following commands:
$ npm install
$ npm run build-server
$ npm run server-dev
Then Visit
http://localhost:3002
Production has Devtools, logging and hot reloading middleware removed and the scripts/css compressed.
In the project's directory, run the following commands:
$ npm run production
$ npm run server
Then Visit
http://localhost:3002