npm i
npm start
- Go to http://localhost:3000.
When running npm start
for development (usually on your local machine), .env
is used as standard for create-react-app. process.env
will be checked first when loading configuration, and no further action is needed.
When building a docker image to host on nginx, the script env.sh
is used to generate the file
public/env-config.js
, which is imported by public/index.html
. .env.template
defines the environment variables, and also serves as a fallback to default Development values.
Since process.env
does not exist in a static web environment, public/env-config.js
is loaded into window.env
. This is handled automatically by src/config.ts
.
New Environment Variables must be added to all files starting with .env
to make sure they run across environments.
Refer to the workflows in .github
and deploy
folders, and the GitHub Actions panel in the repository.
- Style and spacing cleanup
- Add sorting by stat to Character List
- Add view sizes, scroll to top
- Added CSS classes for sticky positioning and independent scrolling in the CharacterDetails component
- Applied the new CSS classes to the respective columns in the CharacterDetails component, making the first column sticky and the second column independently scrollable
Runs the app in development mode. Go to http://localhost:3000 to view it in the browser. Hot reloading and live error checking are enabled.
Launches the test runner in watch mode.
Same as npm test
, and additionally writes the test results to .jest-test-results.json
Builds the minified, optimized app for production to the build
folder, with React in production mode
Run Storybook on port (default: 6006).
Runs npm test:output
, then builds the Storybook in to the storybook-static folder.
See src/stories/README.md for more notes on Storybooks.