Skip to content

Commit c915e15

Browse files
Merge pull request #142 from boostcampwm-2024/feature-fe-#141
환경 변수를 통한 API 및 웹 서버 URL 관리
2 parents 660eb37 + 83e577e commit c915e15

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

frontend/src/components/EditorView.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ export default function EditorView() {
2626

2727
const provider = useMemo(() => {
2828
return new WebsocketProvider(
29-
"ws://localhost:1234",
29+
import.meta.env.VITE_WS_URL,
3030
`document-${currentPage}`,
3131
ydoc,
3232
);

frontend/src/components/canvas/index.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,7 @@ export default function Canvas({ className }: CanvasProps) {
4242
useEffect(() => {
4343
const doc = new Y.Doc();
4444
const wsProvider = new WebsocketProvider(
45-
"ws://localhost:1234",
45+
import.meta.env.VITE_WS_URL,
4646
"flow-room",
4747
doc,
4848
);

0 commit comments

Comments
 (0)