A bare minimum react-redux-webpack-typescript boilerplate with TodoMVC example.
Note that this project does not include Server-Side Rendering, Static code analysis, Testing Frameworks and other stuffs that makes the package unnecessarily complicated. (e.g. yarn, tslint, jest, ...)
If needed, please fork this repository and add your own that meets your requirements.
Ideal for creating React apps from the scratch.
See also: react-mobx-typescript-boilerplate
- Typescript 3
- React 16.4
- Redux 4
- React Router 4.3
- React Router Redux 5
- Redux DevTools Extension
- TodoMVC example
- Webpack 4
- Typescript Loader
- PostCSS Loader
- React Hot Loader
- Mini CSS Extract Plugin
- HTML Webpack Plugin
- Prettier
$ npm install
$ npm start
$ npm run build
$ npm run prettier
MIT
During build, CRA will import the backend API url from API_URL
which you can use via process.env.API_URL
. To change the value of this locally, add that as an environment variable and set it to whatever you need. You can also create a .env
file, of course.
Example:
API_URL=http://localhost:3030
When deploying to a folder instead of the root on a web server, you need paths to resources to be relative (ex: ./scripts
instead of /scripts
). To force webpack to generate relative paths, add a FRONTEND_URL
to your environment with the url to your application.
We are using Loggly to track log messages remotely. If you want to send your logs to Loggly for some reason, you should configure the following variables in your environment (either with .env
or in your operating system):
LOGGLY_SUBDOMAIN=yoursubdomain
LOGGLY_TOKEN=yourlogglytoken
LOGGLY_LEVEL=info
You will need the following env vars for Ghost Inspector tests to run in CI/CD:
GHOST_SUITE_ID=5bdb36e08faf2b12926e7cf4
GHOST_API_KEY=da6f8fa10c129df055519e634530b531d3c068e5