Skip to content

Commit

Permalink
chore : 경로 /api 추가
Browse files Browse the repository at this point in the history
  • Loading branch information
Hellol77 committed Jul 28, 2024
1 parent dcfbc87 commit 5f92b39
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 3 deletions.
2 changes: 1 addition & 1 deletion backend/src/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,6 @@ const port = process.env.PORT || 3000;
const app = express();
const server = createServer(app);


const dbConfig = {
host: process.env.DB_HOST,
user: process.env.DB_USER,
Expand All @@ -32,6 +31,7 @@ async function connectDB() {
}

const io = new Server(server, {
path: "/api",
cors: {
origin: "https://worry-is-bubble.com",
methods: ["GET", "POST"],
Expand Down
2 changes: 1 addition & 1 deletion frontend/src/controller/canvasController.js
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ import io from "socket.io-client";

export default class CanvasController {
constructor() {
this.socket = io(process.env.SOCKET_IP);
this.socket = io(process.env.SOCKET_IP, { path: "/api" });
this.canvas = document.getElementById("canvas");
this.canvas.width = window.innerWidth;
this.canvas.height = window.innerHeight;
Expand Down
3 changes: 2 additions & 1 deletion frontend/src/controller/inputController.js
Original file line number Diff line number Diff line change
@@ -1,9 +1,10 @@
import io from "socket.io-client";

export default class InputController {
constructor() {
this.input = document.getElementById("message_input");
this.button = document.getElementById("message_submit_button");
this.socket = io(process.env.SOCKET_IP);
this.socket = io(process.env.SOCKET_IP, { path: "/api" });
}

init() {
Expand Down

0 comments on commit 5f92b39

Please sign in to comment.