Isomorphic web app boilerplate.
This is a simple boilerplate for web development built on React and Redux , containing modern web development tools:
- React
- Redux
- Connected React Router ( Integration with React Router v4/v5 and Redux)
- React Router Config ( Static route config helpers )
- Webpack v4
- Babel
- Koa
- Node.js v7.6.0 or higher
- v1.0.0 is here (React Router Redux, Express ...)
- Isomorphic App - application that can run both client-side and server-side.
- Hot Module Reloading - replaces modules that have been changed in real time while preserving the state.
- Server Side Rendering - renders pages on the initial stage for fast page loads and search engine optimization.
- Code Splitting - split code into bundles so that code is asynchronously loaded by the client.
- Development / Production Mods.
git clone https://github.com/maxmarinich/react-redux-hmr-ssr.git
- To avoid errors, connect
css
modules something like as follows (with the file extension specifying):
// for .js files
import './styles/index.sass'
import 'styles/index.sass' // if use aliases
// for .scss|sass files
@import('./styles/index.sass')
@import ('~styles/index.sass') // if use aliases
npm i
For Development (HMR, SSR)
If nodemon
not installed (for dev only)
npm i nodemon -g
npm start
else
npm start
- Dev server will listen on
http://localhost:3000
For Production (SSR)
npm run start:prod