Add socket.io client to the website
This commit is contained in:
parent
e7b16143ec
commit
76442fddce
3 changed files with 109 additions and 7 deletions
|
|
@ -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')
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue