Skip to content
Snippets Groups Projects

feat: url in .env

Merged GOEPP THOMAS requested to merge feature/69-change-to-env-url into develop
Compare and
1 file
+ 3
2
Preferences
Compare changes
@@ -26,6 +26,7 @@ export function Lobby() {
let goodId = id;
console.log("isHost :", isHost);
const url = import.meta.env.VITE_API_URL;
const initSSE = async () => {
console.log("Init SSE for quiz ID:", id);
@@ -40,11 +41,11 @@ export function Lobby() {
setRoomIdCreated(response);
}
console.log("User try to joined party with ID:", goodId);
console.log(`https://klebert-host.com:33037/party/join/${goodId}`)
console.log(`${url}/party/join/${goodId}`)
interface EventData extends Event {
data: string; // EventSource envoie toujours les données en tant que string
}
const es = new EventSource(`https://klebert-host.com:33037/party/join/${goodId}`,{
const es = new EventSource(`${url}/party/join/${goodId}`,{
withCredentials:true,
});
setEventSource(es);