This project was generated using @jbknowledge/create-react-app.
- Clone this repository
yarn installyarn start- Navigate to
localhost:8080in your web browser
This project can be built using yarn build which will generate a static website in dist/*
This project is built to a static website which can be hosted anywhere that format is supported. Examples include AWS S3, Azure Storage, and many others.
Configuration per environment is handled through this project's window.env global properties, set in public/env.js. Below is an example env.js file:
window.env = {
ENABLE_DEBUG_MODE: 'false',
API_BASE_URL: 'https://someapi.com/api/v1'
};These values can be accessed anywhere in the project.
Each value in env.js can be overridden programmatically per environment via yarn configure. The configure script provided by @jbknowledge/react-dev will replace each key value in window.env with the value of ENV_<key> if it exists. For example, if you have the following env.js file:
window.env = {
SOME_ARG: 'local value'
};And you run yarn configure while having the environment variable ENV_SOME_ARG set to production value. Your env.js file will be updated to:
window.env = {
SOME_ARG: 'production value'
};NOTE: These values are PUBLIC. Do not store sensitive secrets in this file.
This project is configured with eslint and prettier.
jbk-scripts lint will show you what errors exist in your project. To auto fix the ones that are autofixable, run jbk-scripts lint --fix.