Clone the repo and change into the new directory.
git clone https://github.com/falling-fruit/falling-fruit-web
cd falling-fruit-web
Install the node version specified in the .nvmrc file. This is easiest using nvm.
# Install node version specified in .nvmrc
nvm install
# Use node version specified in .nvmrc
nvm use
yarn is already provided (see .yarn/releases). Use it to install dependencies.
yarn
Initialize your private .env file.
cp example.env .env
Set environment variables in .env.
REACT_APP_API_URL: URL for falling-fruit-api. Use https://fallingfruit.org/api/0.3 for the production API if you only want to make frontend changes, or http://localhost:3300/api/0.3 (by default) if you are contributing to both backend and frontend.
REACT_APP_API_KEY: API key for falling-fruit-api. Use AKDJGHSD for the production API or any value in column api_keys.api_key if running falling-fruit locally (see database seeds).
REACT_APP_RECAPTCHA_SITE_KEY: Site key for reCAPTCHA v3. Use 6Ld99kUdAAAAAAB5nCofKrQB6Vp-e5wR42u5TNZZ for the production API or the site key matching the secret key if running falling-fruit-api locally. reCAPTCHA is only required for adding and editing content as an anonymous (unauthenticated) user.
REACT_APP_GOOGLE_MAPS_API_KEY: Your own API key for Google Maps Platform.
Start the application.
yarn start