react-starter

A starter kit for universal react applications.

Includes

Install

git clone https://github.com/vigosan/react-starter.git
cd react-starter

Redux

The master branch does not include Redux, if you need Redux:

git checkout redux

Development

Requirements

Note: On Mac, if using Homebrew do brew cask install docker and that will install both Docker for Mac and Docker Compose.

  • Makefile (it's probably already on your OS)

Set up

Run make up from the root directory to boot the development environment. Then, the application will be available on http://localhost:8080

Commands

  • Boot up development server make up
  • Show logs make logs
  • Run tests make test
  • Run End-to-End tests make e2e
  • Stop development server make down
  • Build the application make build

Production

Bundle

Run make build from the root directory to generate the index.html and main.js bundle. By default, both files are located in dist folder.

Deployment for Static Sites

You can deploy easily the static site using Surge:

npm install --global surge
make build
surge -p dist

You'll be promted to introduce your email and a password.

Deployment for Dynamic Sites

There is an Express server configured for running in production. Just run npm start and the application will be available on http://localhost:8080 or PORT=8000 npm start if you want to user other port.