tracks lexicons and how many times they appeared on the jetstream
3
fork

Configure Feed

Select the types of activity you want to include in your feed.

feat(client): pull api url from env var

dusk a207054b dd0d7ac0

+3 -6
+3 -6
client/src/routes/+page.svelte
··· 7 7 import StatusBadge from "$lib/components/StatusBadge.svelte"; 8 8 import EventCard from "$lib/components/EventCard.svelte"; 9 9 import FilterControls from "$lib/components/FilterControls.svelte"; 10 + import { PUBLIC_API_URL } from "$env/static/public"; 10 11 11 12 const events = writable(new Map<string, EventRecord>()); 12 13 let eventsList: { nsid: string; event: EventRecord }[] = $state([]); ··· 81 82 const connectToStream = async () => { 82 83 if (isStreamOpen) return; 83 84 websocketStatus = "connecting"; 84 - websocket = new WebSocket( 85 - dev ? "ws://localhost:3000/stream_events" : "/stream_events", 86 - ); 85 + websocket = new WebSocket(`ws://${PUBLIC_API_URL}/stream_events`); 87 86 websocket.binaryType = "arraybuffer"; 88 87 websocket.onopen = () => { 89 88 console.log("ws opened"); ··· 134 133 try { 135 134 error = null; 136 135 137 - const response = await fetch( 138 - dev ? "http://localhost:3000/events" : "/api/events", 139 - ); 136 + const response = await fetch(`http://${PUBLIC_API_URL}/events`); 140 137 if (!response.ok) { 141 138 throw new Error(`HTTP error! status: ${response.status}`); 142 139 }