tbe/tm_react_render

React app for rendering algolia testmenu results


License
Other

Documentation

#Test Menu React Render Module#

Requirements

Note: The latest version of NodeJS comes prepacked with NPM. Run a npm -v in the terminal to check.

Getting started

Install Dependencies:

  • Change your directory into the root of the "app" folder.
  • Run the command npm install or yarn install

Scripts:

  • Local Development Environment : npm start or yarn start in the app root directory.
  • Build app : npm build or yarn build in the app root directory.

Local App Settings:

  • When developing locally and testing settings, copy the variables needed below into a new file called .env.development in the root of the app folder.
  • Set the values of the copied variables. See below for an example of a .env.development file
  • Required variables are needed in order for the app to run, optional variables can be left out, as they have fallback values.
Environment Variables Special Notes
REACT_APP_ALGOLIA_APPID Required
REACT_APP_ALGOLIA_APPKEY Required
REACT_APP_ALGOLIA_INDEX Required
REACT_APP_ALGOLIA_PERFORMING_LOCATION Required
REACT_APP_ALGOLIA_FILTER Optional This variable is parsed as an array, using ', ' as a delimiter
REACT_APP_ALGOLIA_TEST_TYPE Optional
REACT_APP_ALGOLIA_SHOW_TN Optional This variable is parsed as a boolean, so be sure to set this to TRUE or FALSE
REACT_APP_ALGOLIA_SEARCH_ATTRIBUTES Optional This variable is parsed as an array, using ', ' as a delimiter

Example - .env.development

--

REACT_APP_ALGOLIA_APPID = '83SKLXLO'
REACT_APP_ALGOLIA_APPKEY = '94odjftneoerer94858'
REACT_APP_ALGOLIA_INDEX = 'test'
REACT_APP_ALGOLIA_PERFORMING_LOCATION = 'location'
REACT_APP_ALGOLIA_FILTER = 'filter1, filter2'