Skip to content

Commit

Permalink
fix: socket connection in production mode
Browse files Browse the repository at this point in the history
  • Loading branch information
kevinccbsg committed Sep 1, 2023
1 parent f491ef6 commit 6d2d4d9
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion client/src/io/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ interface Methods {

const IOeventEmitter = (methods: Methods, options: Options) => {
if (!socket) {
socket = io('http://localhost:4000/', {
socket = io(import.meta.env.PROD ? '/' : 'http://localhost:4000/', {
query: {
accessKey: options.accessKey,
},
Expand Down

0 comments on commit 6d2d4d9

Please sign in to comment.