Koa React Redux Universal Boilerplate
A fullstack Koa + React + Redux Universal Boilerplate to speed up your development process.
At first was just a simple boilerplate for my next projects on FreeCodeCamp, but that escalated quickly.
- Koa 2 supporting
- React Router
- Universal rendering.
- Redux Devtools
- Dirty deeds done dirt cheap.
.env and edit as you need.
For development, you just need
GITHUB_CLIENT_(ID|SECRET) env vars.
npm run dev-server and
npm run dev-client in separate terminals so you'll the Koa and Webpack servers.
nodemon to restart the server everytime you change some server stuff. Webpack does the same on the client, so no need to
F5 your life.
Now you can open
For a better experience, use zalmoxisus/redux-devtools-extension so you can see Redux's current state.
We are using
webpack-dev-server for development, but they are a no go for production. The solution was simple: build everything. We build our server into a
build/ folder and our client to
The build is made right after
npm install so, let's say you use a PaaS like Heroku. After each commit the system will be rebuilt. Awesome ;)
Two important env vars you should look are
BASE_URL uses the model
https://example.com (no stripe at end). Why? Github auth callback needs your URL match exactly in both your server and in your app Github's config.
SUPPORT_HTTPS is a bool value.