Skip to content

Commit

Permalink
Deploy to droplet
Browse files Browse the repository at this point in the history
  • Loading branch information
jloh02 committed Jan 20, 2024
1 parent 3de4f69 commit ab01b6c
Show file tree
Hide file tree
Showing 4 changed files with 5 additions and 5 deletions.
2 changes: 1 addition & 1 deletion backend/src/server.ts
Original file line number Diff line number Diff line change
Expand Up @@ -94,4 +94,4 @@ io.on("connection", (socket) => {
});
});

httpServer.listen(8000);
httpServer.listen(8080);
2 changes: 1 addition & 1 deletion backend/test/test.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import { io } from "socket.io-client";

const socket = io("http://localhost:8000");
const socket = io("http://localhost:8080");

socket.on("connect", () => {
console.log(socket.id);
Expand Down
2 changes: 1 addition & 1 deletion backend/test/test2.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import { io } from "socket.io-client";

const socket = io("http://localhost:8000");
const socket = io("http://localhost:8080");

socket.on("connect", () => {
console.log(socket.id);
Expand Down
4 changes: 2 additions & 2 deletions frontend/src/utils/socket.tsx
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
import { io } from "socket.io-client";

const socket = window.location.hostname.includes("localhost")
? io("http://localhost:8000")
: io(window.location.hostname, { path: "api/socket.io/" });
? io("http://localhost:8080")
: io(window.location.hostname, { path: "/api/socket.io/" });

socket.on("connect", () => console.log("Connected to socket.io server"));

Expand Down

0 comments on commit ab01b6c

Please sign in to comment.