/express-webpack-react-redux-typescript-boilerplate

:tada: My full-stack boilerplate that using express with webpack, react and typescirpt! (hot module reload and materialize-css supported) :tada:

Primary LanguageTypeScriptMIT LicenseMIT

Express Webpack React Redux Typescript Boilerplate

Dependency Status DevDependency Status CircleCI Appveyor Coverage Status tested with jest MIT Licence

Example

Stack

How to run the example code

Prerequisite

  • node
  • yarn (recommended) or npm
  • docker (recommended) with docker-compose

Quickest way

The easiest way to run the example project is to use docker-compose:

docker-compose up --build

that's it :)

You can also follow instructions below if you want to customize it.

Install project dependencies

Go to project root directory:

yarn install

If you find permission problem when trying to install yarn globally, check this out.

Setup database and session store

You can either

  • run postgresql and redis using docker images:
docker-compose up -d postgres redis

or

  • maintain it by yourself, if so, make sure you set the right config in backend/config.json.

Build & Run

On development (with react-hot-reload and redux-devtools):

yarn run-dev

On production (with uglify-js and other optimazitions):

yarn run-prod

Profile assets bundle

Thanks to webpack-bundle-analyzer, we can analyze and then optimize our assets bundle through DLL Plugin.

yarn profile

Run test

yarn test

Code coverage

yarn coveralls

Deployment

yarn deploy

Contributing

  1. Fork it!
  2. Create your feature branch: git checkout -b my-new-feature
  3. Commit your changes: git commit -am 'Add some feature'
  4. Push to the branch: git push origin my-new-feature
  5. Submit a pull request :D

License

MIT License