This directory contains Ditto's quickstart app for in-browser web applications. This app uses Vite along with Typescript and React, and shows how to include the Ditto SDK in a client-side app running in the browser.
- Node.js v20 or later
To get started, you'll first need to create an app in the Ditto Portal with the "Development" authentication type. You'll need to find your Database ID and Development Token in order to use this quickstart.
From the repo root, copy the .env.sample file to .env, and fill in the
fields with your Database ID and Development Token:
cp .env.sample .env
The .env file should look like this (with your fields filled in):
#!/usr/bin/env bash
# Copy this file from ".env.sample" to ".env", then fill in these values
# A Ditto Database ID, Development token, and Server URL can be obtained from https://portal.ditto.live
DITTO_DATABASE_ID=""
DITTO_DEVELOPMENT_TOKEN=""
DITTO_SERVER_URL=""Next, run the quickstart app with the following command:
npm install && npm run dev
