Socket.io Not emitting messages in localmachine - socket.io

i used socket io for my tauri app and it didnt work.
i cloned the official example repo but it still didnt work.
when i hosted it on replit it worked, when i host it in my local machine it just reloads the page to http://127.0.0.1:5500/index.html? from http://127.0.0.1:5500/index.html

Related

Axios doesn't resolve subdomains when making requests to Local Area Network (e.g. 'http://us.192.168.1.25:8080/auth')

I use React-Native for an app and Spring Boot for backend. For making requests from the app, I use Axios.
I am developing a new backend service and I wanted to test it on the app before making a backend deploy. Usually, I would simply use something like axios.post('http://192.168.1.25:8080/resource'), to access the server running on my PC connected to the smartphone via LAN. It works.
This new service, however, depends on the subdomain sent with the the HTTP request. For instance, on the previous example, I would have to make a post to 'http://english.192.168.1.25:8080/resource'. Making a axios.post() to that address however, doesn't work. Axios gives me the error "can't resolve english.192.168.1.25".
Does anyone know how to solve this? Testing with Postman from another machine, the endpoint 'http://english.192.168.1.25:8080/resource' works just fine (Only the axios lib running on the react-native phone fails).
TLDR;
try to disable your dns-rebind protection in your router by adding an exception for your subdomain.localhost
FritzBox -> Home Network -> Network settings -> DNS Rebind Protection
the other way would be to run your own dns on your system which does the same. Something like dnsmasq or https://github.com/hubdotcom/marlon-tools/blob/master/tools/dnsproxy/dnsproxy.py
I think i found a solution for this problem. something.localhost is routed to your primary dns. In a typically installation its your router. Most modern routers have a dns-rebind-security mechanism. https://en.wikipedia.org/wiki/DNS_rebinding
I ran into the same issue at home and when i tried to get foo.localhost running at work, it works as expected. So what can I say. At home we use a FritzBox 7560 with DNS Rebind protection enabled. At work I have a noname router from a "magenta company" without a rebind protection.

How do I host an app created with Polymer?

I've been Googling this problem for some weeks now and can't find a solution to what seems to be a simple problem. It seems to get pretty convoluted pretty quickly.
I've read through the node.js Heroku getting started and a lot of other tutorials but it seems to be that it won't work with Polymer. I can see my app looks and works fine when I run python -m http.server 8000 from the command line in my directory I can view my app in the localhost and it looks great!
If anyone has any clue as to where I should go from here or can point me to any useful links that would be amazing! Even better if there is some kind of skeleton Polymer website that is freely available.
If you aren't trying to host a node.js or other backend with your polymer app you can use github pages. https://pages.github.com/
Polymer app is essentially only files that the browser needs to retrieve from remote server. You don't need to have backend on the host server. If you were trying to host node.js or other backend you could use heroku to host it.

MEAN stack click-to-deploy Google cloud platform

I'm trying to deploy a MEAN stack app on Google Cloud platform using their functionality "click-to-deploy". Once my VM is created, I can ssh to it, clone my git repository and run my server. My app is accessible at the given IP address on the right port. Everything works fine until I end my session which automatically stops my server. How can I make sure node will still be running afterwards ?
A better way to do it would have been to use the command forever start

Set up a simple go server in a webhost

I wanted to set up a simple go server in a webhost. I acquired a domain mydomain.com and hosted it using Bluehost. Now, going through the Go tutorial, I went through this example http://tour.golang.org/#59 and it works fine on my machine. Now, instead, I want to make the HelloWorldServer work when I call mydomain.com:4000 or some other port.
What I did was ssh to my server at bluehost, install go there, then compile the server and run. But then I try to access mydomain.com:4000 and it is not found. I also tried to change "localhost:4000" to just ":4000". any ideas how to make it work ?
Any help or pointers are appreciated. (some more details: it is a shared-hosting account)
This is due to the firewall on your BlueHost server not having ports (including 4000) open on a shared hosting account, Firewall Port Restrictions
If you want to do some simple (and not so simple) web hosting, why don't you look at Google App Engine

how to setup a SVN server with collabnet subversion edge on windows server, and how to connect to it remotely using Xcode on Mac?

I am a newbie about SVN server. I've certainly used SVN to check in/out codes before, but never learned how to setup a Subversion server it up from ground up.
What I have:
Server | Windows Server 2012 Standard, Activated:
Installed Collabnet Subversion Edge,
Created a repository,
Created users and also started the server, using start button at GUI on localhost:4434/csvn/.
Client | MacOSX Mountain, with Xcode 4.5 Installed:
I have tried to add repository by using the external IP address and the repository name
like https://1.1.1.1/svn/, but as expected, it does not work and says "Host is unreachable".
I have tried to use the local hostname, no luck either. Although I did notice in their documentation, they mentioned IP address setting, but I cannot find it anywhere.
I would like to make it so that users can access and use the SVN repository remotely and locally.
I have no idea what to do, please help me. Thanks for your time!
Go back to the server for a minute. When you are configuring it, are you only using the local web browser? Have you tried accessing the server using web browser from your Mac? I would see if the Mac can reach the web gui first. Maybe you have network issues you have to resolve, such as DNS, routing or firewall.
In terms of using XCode, or any SVN Client, the URL you must enter is the URL to your repository. That will not be:
https://1.1.1.1/svn/
It will be something like:
https://1.1.1.1/svn/reposname
In the Subversion Edge web GUI if you go to the list of repositories, you will see an example checkout command next to each repository. This command shows you the URL to enter in a SVN client to reach the root of the repository. Example screenshot here:
https://ctf.open.collab.net/sf/projects/svnedge/screenshots/screens/repos/repos.png
I think I have sloved the problem. I knew I have to access the repo using my external IP address somehow, but when I tried something like, for example my IP is 1.1.1.1, when I typeed https://1.1.1.1/svn/reposname, I got a no response message.
I figured that since there are more than 1 computers on my local network, the router has to somehow direct the request to my server only, not some other machine. After some reaserch I found that port forwarding does the trick. Since apache server uses port 80 as default, just get the default gateway ip using ipconfig from CMD, then enable port forwarding for port 80, to the server's local ip address. At least I can access it using my external ip on my local network. I will try to access it remotely and see.

Resources