Skip to content

Commit

Permalink
fix ws port
Browse files Browse the repository at this point in the history
  • Loading branch information
annelhote committed Jan 18, 2024
1 parent 701b2c5 commit bbd7281
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 3 deletions.
3 changes: 2 additions & 1 deletion client/.env.staging
Original file line number Diff line number Diff line change
@@ -1,2 +1,3 @@
VITE_HEADER_TAG=staging
VITE_WS_HOST=wss://localhost:443
VITE_WS_HOST=ws://localhost
VITE_WS_PORT=8080
4 changes: 2 additions & 2 deletions client/src/pages/index.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ import { status } from '../config';
import 'primereact/resources/primereact.min.css';
import 'primereact/resources/themes/lara-light-indigo/theme.css';

const { VITE_WS_HOST } = import.meta.env;
const { VITE_WS_HOST, VITE_WS_PORT } = import.meta.env;

export default function Home() {
const [allAffiliations, setAllAffiliations] = useState([]);
Expand All @@ -48,7 +48,7 @@ export default function Home() {
cacheTime: Infinity,
});

useWebSocket(VITE_WS_HOST, {
useWebSocket(`${VITE_WS_HOST}:${VITE_WS_PORT}`, {
onMessage: (message) => setCurrent(Number(message.data) + 1),
share: true,
});
Expand Down

0 comments on commit bbd7281

Please sign in to comment.