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

:tada: A full-stack boilerplate that using express with webpack, react and typescirpt!

Primary LanguageTypeScriptMIT LicenseMIT

express-webpack-react-redux-typescript-boilerplate

Dependency Status CircleCI Appveyor Coverage Status PRs Welcome Tested with jest License: MIT Template from jarvis

Example

  • Demo Page - contains classic todo list, async server call, and 404 page with random moe images. (Support multi-language, currently English, Chinese, and Japanese)

    Home Page

    React Page

    404 Page

Stack

How to run the sample code

Prerequisite

  • yarn or npm
  • (optional) docker 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

  • setup 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 hot reload):

yarn dev

On production (with terser and other optimazitions):

yarn prod

Profile assets bundle

Thanks to webpack-bundle-analyzer, assets bundle can be analyzed and optimized through DLL Plugin.

yarn profile

Run test

yarn test

Code coverage

yarn coverage

Deployment

Every push on master branch will trigger Github Actions for heroku deployment.

Contributing

See CONTRIBUTING.md

License

MIT License