ThomasDavisA / simple-twitch-chat-visualizer

0 stars 0 forks source link

Client environment variables #46

Closed mdavisprog closed 3 years ago

mdavisprog commented 3 years ago

The client was created with the create-react-app package, which already contains a way of reading environment variables from the .env file. However, this behaves differently than the standard dotenv package installed for a NodeJS server. All custom environment variables must be prefixed with 'REACTAPP' in order for those variables to be placed in the environment.

Create-React-App also recommends committing the .env file and override any local or other environment changes with .env.local, .env.test, etc. files, which should be ignored.

This pull request also implements setting a test background color for development, setting a list of test users, and generating test messages. The options are listed as:

REACT_APP_SOLID_BACKGROUND REACT_APP_TEST_USERS REACT_APP_TEST_MESSAGES

Close #43

ThomasDavisA commented 3 years ago

This looks good! Merging.