Internally, this is the difference between binding to address 127.0.0.1 or 0.0.0.0
A bug or a feature request
Because if it were me, I'd want to bind to 127.0.0.1, but you want to bind to 0.0.0.0 for other devices to access... But if I'm in public Wi-Fi I don't want others to access my development server, so that's why I don't know how to answer if this is a bug or not
And regarding your question what you're doing wrong, probably nothing, it's Wappler's fault they configured the bind addresses differently
I suspect the answer lies in how Wappler have implemented the PHP server within Wappler.
With the node Wappler Own server model you have an actual server running.
With PHP own server, there is not actually a server such as Apache running, the server is simulated within the Wappler environment with reference to the PHP CLI.
Hence it is only available on a local host basis where the CLI is running and not from elsewhere on the network.
Therefor this is probably not a bug but a limitation of the technology used.
Yes but my point is i don't think (I will be happy to be wrong) this is available across the network as implemented in Wappler. I see george posted at exactly the same time as me and is looking to resolve that.
Depends on your system configuration and network/firewall settings and will more than likely require some changes to be made. If you're on the same network, ie a router at home, and the host system is configured to accept connections then you will be able to preview the site (probably in the 192... range). If not then only devices with a local address (127...) will be able to connect to the host.
If you are in an insecure environment the last thing you want is for 'strangers' to be able to find (network scan) and access your application or connect to your device.
This leaves me unsure what this feature is for as 'straight out of the box' in the majority of circumstances it will not work without configuration...? Even if the correct I.P is assigned the host won't accpet it...
Thanks @Cheese yes, that's clear, but by "don't understand this" I was refering on @Apple suggestion.
Because actual configuration on nodejs Wappler own server allows local connections ..
That's the part that got me confused:
I start a nodejs project, start server, then all my devices can access that..
Yes as in 127... You'll need to whitelist the local router DHCP range on your host machine to allow connections from devices connected to the router (more than likely 192...). You may even have to make changes to your router configuration to enable the ports also. It is all dependant on the configuration of the host and the local network.
And I'm agree with that.
Just asking why @Apple says:
If nodejs actual server allows that...
If I'm not misunderstanding things here, he's not ok with allowing 0.0.0.0, because on public wi-fi, everyone has access to it..
But on a nodejs server, it seems, that is already happening that.
Any server/service on the local network is under the same rule. Host and Client. Host has to be configured to allow a Client to connect before a Client can connect. Doesn't matter if it is Docker, Wappler, WAMP, MAMP, XAMPP, Apache, MySQl yada-yada... All follow the same principle. Your local machine will always connect (the one you are on) but those on a network (shared or otherwise) will need to be whitelisted on the host, and the corresponding ports may also require configuration. Also if you have features like MAC address filtering (usually on the router) they will also require updating.
The point is Wappler team configured the bind addresses differently for PHP and NodeJS.
We don't know if the bug is allowing other devices to access your server, or if the bug is not allowing other devices to access your server. Basically, what you consider a bug I consider a security issue
But George will be updating so it binds to 0.0.0.0, so you'll be able to access from other devices
@Cheese I get that, thanks and sorry because I think my main language is forcing me to confuse things here..
What I'm trying to say, just a friendly advice to @Apple about this:
He says he don't want to anybody get access to his server, but by default, without taking care of rules, that's happening already, and it's more an issue of rules than opening a server on 0.0.0.0
Just want to say a friendly advice here, because from what I see, by default, nodejs server is not pointing to 127.0.0.1, right?
If it's not opening on 127.0.0.1 that means, that everybody can access, by default, from everyone on the same network.
The 0.0.0.0 is a wildcard, essentially it is an open door. Many Administrators only allow specified IPs in a Whitelist. I believe myself and Apple are both in the same boat. This would not work on our network, and I'd never allow it. Lets say you have a MySQL server running and you added 0.0.0.0 to the Whitelist. Essentially what you are doing is saying ALL I.P address's can connect to the server. Now I'm not sure on how Wappler spins up its own server but this address is (will be) Whitelisted.