bonesmasher commited on
Commit
0ee3d32
·
verified ·
1 Parent(s): 2c08099

Update lib/socket.ts

Browse files
Files changed (1) hide show
  1. lib/socket.ts +8 -8
lib/socket.ts CHANGED
@@ -1,8 +1,8 @@
1
- import { io } from "socket.io-client";
2
-
3
- // "undefined" means the URL will be computed from the `window.location` object
4
- const URL = process.env.NEXT_PUBLIC_SOCKET_URL || "http://localhost:8000";
5
-
6
- export const socket = io(URL, {
7
- autoConnect: false,
8
- });
 
1
+ import { io } from "socket.io-client";
2
+
3
+ // "undefined" means the URL will be computed from the `window.location` object
4
+ const URL = process.env.NEXT_PUBLIC_SOCKET_URL || undefined;
5
+
6
+ export const socket = io(URL, {
7
+ autoConnect: false,
8
+ });