Add socket.io client to the website

This commit is contained in:
Oliver-Akins 2022-01-04 21:16:21 -07:00
parent e7b16143ec
commit 76442fddce
3 changed files with 109 additions and 7 deletions

View file

@ -1,4 +1,12 @@
import App from './App.svelte'
import io from "socket.io-client";
let url = "/";
if (import.meta.env.DEV) {
url = "http://localhost:3001/";
};
const socket = io(url);
const app = new App({
target: document.getElementById('app')