tbe/tm_react_render

React app for rendering algolia testmenu results


README

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 VariablesSpecial Notes
REACT_APP_ALGOLIA_APPIDRequired
REACT_APP_ALGOLIA_APPKEYRequired
REACT_APP_ALGOLIA_INDEXRequired
REACT_APP_ALGOLIA_PERFORMING_LOCATIONRequired
REACT_APP_ALGOLIA_FILTEROptionalThis variable is parsed as an array, using ', ' as a delimiter
REACT_APP_ALGOLIA_TEST_TYPEOptional
REACT_APP_ALGOLIA_SHOW_TNOptionalThis variable is parsed as a boolean, so be sure to set this to TRUE or FALSE
REACT_APP_ALGOLIA_SEARCH_ATTRIBUTESOptionalThis 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'