HL7-1: add documentation #4
1 changed files with 2 additions and 1 deletions
|
@ -16,6 +16,7 @@
|
|||
import { Label } from '$lib/components/ui/dropdown-menu';
|
||||
import { env } from '$env/dynamic/public';
|
||||
import { Tooltip, TooltipContent, TooltipProvider, TooltipTrigger } from '$lib/components/ui/tooltip';
|
||||
import { dev } from '$app/environment';
|
||||
|
||||
// connection state
|
||||
let ws = $state<WebSocket | undefined>(undefined);
|
||||
|
@ -64,7 +65,7 @@
|
|||
console.log('Connecting to server...');
|
||||
connectionState = ConnectionState.connecting;
|
||||
|
||||
const socket = new WebSocket(`wss://${env.PUBLIC_SERVER}`);
|
||||
const socket = new WebSocket(`${dev ? 'ws' : 'wss'}://${env.PUBLIC_SERVER}`);
|
||||
|
||||
socket.onopen = () => {
|
||||
console.log('WebSocket connection established.');
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue