-
Notifications
You must be signed in to change notification settings - Fork 1
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
New CI/CD #168
New CI/CD #168
Conversation
Florian-A
commented
Nov 6, 2023
•
edited
Loading
edited
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
j'ai essaye ca pour socket.tsx dans le front, jsp si ca aide ca genere une autre erreur
import { io } from "socket.io-client";
const URL: string = "http://localhost"// process.env.REACT_APP_BACKEND_URL?.toString() || '';
const socketOptions = {
autoConnect: false,
query: {
transports: "websocket",
},
};
export const socket = io(URL, socketOptions);
export const friendsSocket = io(`${URL}`, { ...socketOptions, path: '/friends' });
export const chatsSocket = io(`${URL}`, { ...socketOptions, path: '/chats' });
export const gamesSocket = io(`${URL}`, { ...socketOptions, path: '/game' });
https://socket.io/fr/docs/v3/reverse-proxy/#nodejs-http-proxy
… on ne réussie pas tout du premier coup !
Attention, bien utiliser le second env que j'ai posté dans le wiki pour tester |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nice c'est good j'ai regarde pour enlever l'erreur mais pas trouve pour l'instant
@@ -1,44 +1,13 @@ | |||
import { io } from "socket.io-client"; | |||
|
|||
const URL: string = process.env.REACT_APP_BACKEND_URL?.toString() || ''; | |||
const URL: string = process.env.REACT_APP_FRONTEND_URL?.toString() || ''; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ne fonctionnera pas si le back et front ont un url different ?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
le commentaire au dessus sert a rien c'est inutile qui a ecrit ca
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
REACT_APP_FRONTEND_URL = http://domain/
REACT_APP_BACKEND_URL = http://domain/api
Les websockets ont besoin d'aller sur juste domain pour apres etre bien redirige par le reverse.
C'est pas beau mais bon, voilà quoi
J'arrive pas a supprimer le message d'erreur, mais je trouve ca : facebook/create-react-app#11779 |