Skip to content

snakemode/whiteboard-component-ablyfork

 
 

Repository files navigation

Ably Drawing Component

Run the demo

Create file ./sample-app/.env with the following content:

VITE_ABLY_API_KEY=your_key

Then on the command line run:

npm run start

This starts up the development / test app for this component. Packaging this repository will result in a usable NPM package.

Usage

First import the component as a module:

import * as AblyDraw from "../src/index"; // replace with package name if published

Then create an instance of the component:

<ably-draw 
    api-key="you-can-put-your-key-here-but-please-dont" 
    get-token-url="https://ppwcfol4k7.execute-api.us-east-2.amazonaws.com/default/createTokenRequest"
    channel="drawing"
></ably-draw>

Choose one of api-key or get-token-url for authentication credentials.

Use get-token-url in real world scenarios - api-key exists only for testing and should never reach a real world web application.

Ably logo

About

A demo of usage of whiteboard and cursor sharing components, powered by Ably

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • TypeScript 93.3%
  • HTML 4.4%
  • Dockerfile 1.2%
  • CSS 1.1%