-
Notifications
You must be signed in to change notification settings - Fork 13
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
How to connect to a different domain #30
Comments
Hi! It should be possible like so: const { socket } = useSocket("https://some.domain.com", {
// other options
});
const { lastMessage } = useSocketEvent<string>(socket, "message", {
onMessage: (message) => console.log(message),
}); |
Hi, thanks just a side note does the code above take the port number into account. |
This is a weird one. I tried passing the host and port options to the socketIo constructor, like so: |
I see, anyway i'll give it a try and let you know of my result |
Hi, I want to connect to a different domain other than the one on my localhost because backend will be deployed in other platform,
but it seems that it only connects to the local platform (the one front runs on).
I,ve seen that there is createConnection function to change it's urlConfig but not quite sure how to do,
can you please tell if it is possible and if yes how?
Thanks in advance
The text was updated successfully, but these errors were encountered: