/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

CircleCI Dependency Status DevDependency Status 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 below instructions if you want it to be more customizable

Install project dependencies

Go to project root directory:

yarn install
yarn global add gulp

If you meet 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 your own, if so, make sure you set the right configs in backend/config.json

Build & Run

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

gulp

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

NODE_ENV=production gulp

Profile assets bundle

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

gulp profile

Run test

gulp test

Code coverage

gulp coveralls

Deployment

gulp 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