- Run the app.
yarn startornpm start - Build the app.
yarn buildornpm run build - Lint the app.
yarn lintornpm run lint - Test the app.
yarn testornpm run test - Run the app with SSR.
yarn ssrornpm run ssr
- Clone the repository
- Install dependencies:
yarnornpm install - Create the environment variables files in root folder(.env.dev, .env.staging and .env.prod):
.env.example example:
API_URL=http://your-api-url.com
CABLE_URL=wss://your-api-url.com/cable
AWS_BUCKET=bucket
AWS_REGION=region
AWS_ACCESS_KEY_ID=key_id
AWS_SECRET_ACCESS_KEY=secret_key
- Start the dev server:
yarn startornpm start -s
To change the set of environment variables for a script it's needed to run ENV=my_environment before the script.
For example: ENV=staging yarn build
- After adding the project to CC, go to
Repo Settings - On the
Test Coveragetab, copy theTest Reporter ID - Replace the current value of
CC_TEST_REPORTER_IDon theconfig.yml file (.circleci/config.yml)with the one you copied from CC
Install Node 7.0.0 or greater, 10.14.2 LTS preferred
Project is currently set to node version 10.14.2 LTS. Make sure that you are using the node version specified in the package.json, if you prefer to use a different one you can change it there.
Install Yarn - Fast, reliable, and secure package manager
This base is already set up with a Node server for SSR.
The command yarn ssr will compile the server and client.
To enable your progressive web app, set the environment variable ENABLE_PWA in your dot environment file.
The server is prepared to fetch data directly from the backend before rendering the HTML.
- Add the environment variables for each .env AWS_BUCKET, AWS_REGION, AWS_ACCESS_KEY_ID, AWS_SECRET_ACCESS_KEY
- Run the command to deploy with an environment
ENV=your_environment yarn deploy
- Add all the environment variables in .env to Heroku
- Add the env variable NPM_CONFIG_PRODUCTION=false to Heroku
- Deploy your branch to Heroku
| Tech | Description |
|---|---|
| React | Fast, composable client-side components. |
| Redux | Enforces unidirectional data flows and immutable, hot reloadable store. Supports time-travel debugging. |
| React Router 4 | A complete routing library for React |
| Babel | Compiles ES6 to ES5. Enjoy the new version of JavaScript today. |
| Webpack 4 | Bundles npm packages and our JS into a single file. Includes hot reloading via React Hot Loader. |
| Express | Fast, unopinionated, minimalist web framework for node. |
| Jest | Automated tests with built-in expect assertions and Enzyme for DOM testing without a browser using Node. |
| ESLint | Lint JS. Reports syntax and style issues. Using eslint-config-airbnb for the airbnb style guides. |
| SASS | Compiled CSS styles with variables, functions, and more. |
| PostCSS | Transform styles with JS plugins. Used to autoprefix CSS |
| Stylelint | Modern CSS linter that helps you enforce consistent conventions and avoid errors in your stylesheets. |
| Isomorphic Fetch | Is a Promise-based mechanism for programatically making web requests in the browser. |
| Immutable.js | Immutable persistent data collections for Javascript which increase efficiency and simplicity. |
React Redux Base is available under the MIT license. See the LICENSE file for more info.
React Redux Base is maintained by Rootstrap with the help of our contributors.
