Skip to content

Commit

Permalink
asd
Browse files Browse the repository at this point in the history
  • Loading branch information
Bit-Barron committed Oct 31, 2024
1 parent ffba44b commit b73fd2c
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion src/lib/server/socket.ts
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ export function createSocketServer(server: HTTPServer) {
methods: ['GET', 'POST'],
credentials: true
},
path: '/socket.io',
path: '/api/socket.io',
transports: ['websocket', 'polling'],
pingTimeout: 60000,
pingInterval: 25000
Expand Down
2 changes: 1 addition & 1 deletion src/routes/(main)/dashboard/chat/[id]/+page.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@
const socketPort = isDev ? ':3000' : '';
const socketUrl = `${window.location.protocol}//${window.location.hostname}${socketPort}`;
socket = io(socketUrl, {
path: '/socket.io',
path: '/api/socket.io',
transports: ['polling', 'websocket'],
reconnection: true,
reconnectionAttempts: 5,
Expand Down
2 changes: 1 addition & 1 deletion vite.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ export default defineConfig({
plugins: [sveltekit()],
server: {
proxy: {
'/socket.io': {
'/api/socket.io': {
target: 'ws://localhost:3000',
ws: true
}
Expand Down

0 comments on commit b73fd2c

Please sign in to comment.