Data Sync - Quick Start
Let’s test out running Data Sync by cloning the Quickstart (opens in a new tab). You’ll need to grab your API keys from the Portabl Console (opens in a new tab) once you've signed up.
Option | Type | Description |
---|---|---|
clientId | string | Your public app identifier to access Portabl's APIs |
clientSecret | string | Your secret that shall be known only by your private apps to access Portabl's APIs |
Once you have obtained your API keys from the Portabl Console, we can start integrating Data Sync!
Here you will find necessary steps and samples to get the app running on your machine utilizing our APIs and our Client-side SDKs (opens in a new tab).
Setup
Let's configure your environment variables with the API keys you obtained from the console.
Setting up Environment Variables for Data Sync quickstart
Create a .env
file from .env.example
in the root directory and fill out the environment variables needed for Data Sync.
cp apps/web/.env.example apps/web/.env
Running the Project
You have two options for running the quickstart example: with Docker or without it.
Running with Docker
This repository is configured to be built and run using Docker and Docker Compose.
Make Commands:
up
: Builds and starts the container.logs
: Tails logs from the container.stop
: Stops the running container.
To start the container, use one of the following commands:
# Sync Javascript
make up integration=sync lib=javascript
# Sync React
make up integration=sync lib=react
Running without Docker
If you prefer not to use Docker, follow the steps below:
-
Install dependencies:
yarn
-
Run both the frontend and api sample projects in development mode. Choose one of the preset commands based on the library you want to run:
# Sync Javascript yarn dev:sync:javascript
# Sync React yarn dev:sync:react