This project was bootstrapped with Create React App. The API was bootstrapped by express-generator.
- Install the latest LTS version of NodeJS. Currently that is v14.
- After installing Node, open a terminal window and install the
yarn
package manager. You can do that by runningnpm install -g yarn
in the terminal. - Make sure you have Git installed. Try running
git
in a terminal. If it is not installed, MacOS will prompt you to install XCode Build Tools which will do the job for you. Otherwise, use the latest version available here.
- Clone the repository in a directory using the following command. Then, change directory into the project that you just cloned.
# clone app
git clone https://github.com/osamaaamer95/sdk-react-fullapp
# change to project directory
cd sdk-react-fullapp
- Install dependencies in the frontend and backend directories.
- The frontend directory is the root project directory.
- The backend directory is the
/api
directory.
# Install frontend dependencits
yarn install
# Install backend dependencies
cd api
yarn install
- Create a
.env
file in the/api
directory and copy environment variables to it. These environment variables are the ones shown on the SDK deployment page.
# Move to API directory if not already there
cd api
# Copy the env sample file
cp .env.sample .env
Now, open the newly copied .env
file and fill in all three of these values after you create a deployment on the Integry web app.
INTEGRY_APP_KEY=
INTEGRY_APP_SECRET=
INTEGRY_DEPLOYMENT_ID=
- Start the API and frontend in separate terminal instances.
# In root directory in terminal A
yarn start
# In api directory in terminal B
yarn start
- Open http://localhost:3000 to view the app running in the browser.