Isomorphic web application skeleton build on top of React, Express, Webpack, Babel.
- ES6/ES7/ES8 support
- Fully automated toolchain with npm/yarn scripts
- Environment configuration
- Linting and testing tools
- Server-side rendering (SSR)
- Clone and install dependencies:
$ git clone https://github.com/kvokov/react-starter.git myapp && cd myapp
$ yarn install
- In first terminal run application in development mode:
$ yarn start
- In second terminal run development server:
$ yarn serve
- Visit
localhost:3000
That's it! 😎
To override configuration variables for local environment create .env
file in project root with needed variables. Example:
NODE_ENV=development
WEB_PORT=3000
WDS_PORT=7000
API_URL=https://emaple.com/api
To find used variables check src/shared/config.js
. Also system environment variables are used too.
-
$ yarn start
- Run application in development mode. -
$ yarn serve
- Runwebpack-dev-server
for development purposes.
-
$ yarn prod:build
- Make production build. -
$ yarn prod:start
- Start application server withPM2
in production mode. -
$ yarn prod:stop
- Stop production server. -
$ yarn prod:restart
- Restart production server. -
$ yarn prod:build-server
- Make production build for server only. -
$ yarn prod:build-client
- Make production build for client only.
-
$ yarn lint
- Check code linting. -
$ yarn test
- Run tests.