🚀 Quickstart

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.

OptionTypeDescription
clientIdstringYour public app identifier to access Portabl's APIs
clientSecretstringYour 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 the sample "web" app

Create a .env file from .env.example in the web directory and fill out the environment variables.

cp apps/web/.env.example apps/web/.env

Setting up Environment Variables for the sample "api" app

Create a .env file from .env.example in the api directory and fill out the environment variables with respective values from https://console.getportabl.com/api-keys (opens in a new tab).

cp apps/api/.env.example apps/api/.env

Running the project

To run the quickstart example, you may choose to run it with Docker or without it.

Running with Docker

This repo is configured to be built with Docker, and Docker Compose.

To build images and run containers:

# Create a network, which allows containers to communicate
# with each other, by using their container name as a hostname
docker network create portabl
 
# Start sample app in detached mode
docker-compose -f docker-compose.yml up -d

Open http://localhost:3000 (opens in a new tab).

To shutdown all running containers:

docker kill $(docker ps -q) && docker rm $(docker ps -a -q)

Running without Docker

  1. Install dependencies
yarn
  1. Run both "web" and "api" sample projects in dev mode
yarn dev