/svelte-link-preview

Svelte port of @dhaiwat10/react-link-preview

Primary LanguageSvelte

Svelte Link Preview

Svelte port of react-link-preview. WIP.

How to use

npm install -D https://github.com/magellancl/svelte-link-preview.git
import { LinkPreview } from 'svelte-link-preview';

<LinkPreview url='https://github.com/dhaiwat10', proxyUrl='http://localhost:8080'>

You need to setup your proxy with https://github.com/Rob--W/cors-anywhere. Quick setup for a local use :

git clone https://github.com/Rob--W/cors-anywhere.git
cd cors-anywhere
npm install
export PORT=8080
export CORSANYWHERE_WHITELIST=http://localhost:4173,http://localhost:5173 // Whitelist your domain name
node server.js