Skip to content

Commit

Permalink
Sync demo: Use the current Playground URL instead of hardcoding local…
Browse files Browse the repository at this point in the history
…host
  • Loading branch information
adamziel committed Nov 6, 2023
1 parent dbad2aa commit a121507
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion packages/playground/website/demos/peer.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ import {
ParentWindowTransport,
loggerMiddleware,
} from '@wp-playground/sync';
import { getRemoteUrl } from '../src/lib/config';

export async function runDemo(
iframe: HTMLIFrameElement,
Expand All @@ -13,7 +14,7 @@ export async function runDemo(
) {
const playground = await startPlaygroundWeb({
iframe,
remoteUrl: 'http://localhost:4400/remote.html',
remoteUrl: getRemoteUrl().toString(),
});
const siteURL = await playground.absoluteUrl;
console.log({ clientId, siteURL });
Expand Down

0 comments on commit a121507

Please sign in to comment.