From c643aa03ed7f155ba2f3f24f9f89326cc6c54374 Mon Sep 17 00:00:00 2001 From: Shin Hyuk Jun Date: Mon, 18 Mar 2024 16:29:14 +0900 Subject: [PATCH] =?UTF-8?q?1=EC=B0=A8=20=EB=8D=B0=EB=AA=A8?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- frontend/src/Component/Auth/SignupPage.js | 4 ++-- frontend/src/Component/Page/Page.js | 2 +- frontend/src/setupProxy.js | 4 ++-- 3 files changed, 5 insertions(+), 5 deletions(-) diff --git a/frontend/src/Component/Auth/SignupPage.js b/frontend/src/Component/Auth/SignupPage.js index cc1cc388..7c91af36 100644 --- a/frontend/src/Component/Auth/SignupPage.js +++ b/frontend/src/Component/Auth/SignupPage.js @@ -102,11 +102,11 @@ const SignupPage = () => { toastr.success("회원가입 성공! 로그인을 진행해주세요."); navigate("/login"); } else { - // 서버 응답에서 반환된 에러 메시지를 사용하여 사용자에게 보다 구체적인 정보 제공 - const errorData = await response.json(); + const errorData = await response.text(); alert(`회원가입 실패: ${errorData.message}`); } } catch (error) { + console.error("Error:", error); alert("처리에 실패하였습니다."); } diff --git a/frontend/src/Component/Page/Page.js b/frontend/src/Component/Page/Page.js index a579f378..659c5fd9 100644 --- a/frontend/src/Component/Page/Page.js +++ b/frontend/src/Component/Page/Page.js @@ -77,7 +77,7 @@ function Page() { const roomId = noteId; const ydoc = getYDocInstance(roomId); const provider = new WebsocketProvider( - "ws://localhost:4000", // 웹소켓 서버 주소, // 웹소켓 서버 주소 + "wss://demos.yjs.dev/ws", // 웹소켓 서버 주소, // 웹소켓 서버 주소 roomId, // 방 이름 ydoc ); diff --git a/frontend/src/setupProxy.js b/frontend/src/setupProxy.js index b86ae921..a9992379 100644 --- a/frontend/src/setupProxy.js +++ b/frontend/src/setupProxy.js @@ -4,8 +4,8 @@ module.exports = function(app) { app.use( '/api', createProxyMiddleware({ - target: 'http://localhost:8080', // 서버 URL or localhost:설정한포트번호 - //target: 'https://sharenote.shop:8080', // 서버 URL or localhost:설정한포트번호 + // target: 'http://localhost:8080', // 서버 URL or localhost:설정한포트번호 + target: 'http://sharenote.shop:8080', // 서버 URL or localhost:설정한포트번호 changeOrigin: true, }) );