fix
This commit is contained in:
parent
eb92d39d40
commit
3a8929b9d7
File diff suppressed because one or more lines are too long
@ -1,11 +1,9 @@
|
|||||||
import { dev } from '$app/env';
|
import { dev } from '$app/env';
|
||||||
import cuid from 'cuid';
|
import cuid from 'cuid';
|
||||||
import Cookies from 'js-cookie';
|
import Cookies from 'js-cookie';
|
||||||
import { getAPIUrl } from '$lib/api';
|
|
||||||
import { getDomain } from '$lib/common'
|
|
||||||
import { writable, readable, type Writable } from 'svelte/store';
|
import { writable, readable, type Writable } from 'svelte/store';
|
||||||
import { io as ioClient } from 'socket.io-client';
|
import { io as ioClient } from 'socket.io-client';
|
||||||
const socket = ioClient(getAPIUrl(), { auth: { token: Cookies.get('token') }, autoConnect: false });
|
const socket = ioClient(dev ? 'http://localhost:3001' : '/', { auth: { token: Cookies.get('token') }, autoConnect: false });
|
||||||
|
|
||||||
export const io = socket;
|
export const io = socket;
|
||||||
interface AppSession {
|
interface AppSession {
|
||||||
|
Loading…
Reference in New Issue
Block a user